Links to page builder scripts and styles. Links to all necessary resources, such as stylesheets and scripts.Full HTML markup, including the html, head and body elements.The output must be a full HTML page, so the view must include the following:.Create a view with code that defines the output of the page template according to the general MVC best practices.Use the following process to develop a page template: Creating page templates in MVC Areas may lead to unexpected behavior. Page templates are designed to be used in the global scope and their code files must be placed in the application root of your MVC project (not in an MVC Area). Register the default page template in the system. for all editable areas placed within templates Automatically initializes the page data context and the page builder feature Returns a TemplateResult object, created with the retrieved page Responds with the HTTP 404 error when the page is not found Path("/Landing-pages", PathTypeEnum.Children) TreeNode page = pagesRetriever.Retrieve(query => query Retrieves a page from the Xperience database Public ActionResult Index(string pageAlias) / A GET action displaying a page where you wish to use page templates. Public PageTemplateCustomRoutingInitialization(IPageRetriever pagesRetriever) Gets instances of required services using dependency injection Private readonly IPageRetriever pagesRetriever See Saving pages as custom page template. If the page contains page builder content, such as widgets and sections, the custom page template will contain a snapshot of this content on top of the layout defined in the default page template sections. Default page templates specify the layout of a page without page content.Ĭustom page templates are created from the page that was created using a default page template. Default page templates are defined in the code of the live site project.Using pages with no content, just page builder sections that can be of a different layout for each page template.Using different JavaScript, CSS, or _Layout.cshtml files for the pages of the same page type (and the structured content or page builder content defined in it).For example, with the content reordered or modified for the new page. Defining the page builder content once, then reusing it for other pages.Creating pages that have a similar structure or content, such as articles or landing pages.This can be useful, for example, if you have multiple possible layouts for product or article pages, and want to allow content editors to choose a suitable layout for each individual page. P age templates can also be used for creating pages with structured content (even without any page builder editable areas). See Using page templates to see the instructions for content editors.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |