![]() ![]() MarkedType – the System.Type of the controller assigned to handling the requests for the content type.Generated classes expose the class name under the CONTENT_TYPE_NAME constant. Both are set during content type creation. ContentTypeName – the code name of the content type this controller handles.The RegisterWebPageRoute attribute requires the following parameters: You provide this information using the RegisterWebPageRoute assembly attribute ( .Routing namespace). A matching controller is found based on the content type and tree path (location in the content tree) of the requested page. When a request targets the URL of a page in the content tree of a website channel, the system reroutes the request to a matching custom controller. Register the controllers in the system together with the routes for which they are responsible.Implement the controller logic (together with view models and views).Decide which content types and sections of the content tree will be managed using your route.You can execute arbitrary code within the controller, pass additional data required by the view, or switch between different views as needed. This grants you full control over the data and processing logic. When developing views for pages you need to provide your own controller together with a view model. See Handle Page Builder-enabled content types. When handling content types with the Page Builder feature enabled, there are a couple of additional prerequisites to keep in mind when setting up the routing scheme. When used with content tree-based routing, the system automatically generates URLs for new pages. The option indicates that you want pages created from this content type to be accessible using a URL. The routing scheme requires content types for pages with the Include in routing option set. This page describes the steps needed to fully integrate the routing feature into your project. For a detailed overview, see Content tree-based routing. A URL is granted to pages upon creation based on their name and position in the content tree. Content tree-based routing handles URL generation and routing for pages in website channels. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |