Having a Page Template as Inline Code means you can change you HTML markup of your Page Template on-the-fly and don’t need to worry about deploying your changes to your webserver(s).
-
In the Settings section of Agility, select Page Templates and click on New Page Template.
-
Name the template, select "Website" as the Digital Channel Type, and select "Inline Code" as the Output Type.
-
Proceed to add at least one module zone.
-
Click Save to create the Page Template and initialize the Inline Code file.
-
Click Edit Inline Code to edit the generated Inline Code file.
- The Inline Code file should already have some pre-generated HTML and placeholder(s) to render your associated content zone(s). Proceed to customize your HTML layout.
Optionally, you may add a line of code at the top to dictate which Masterpage this Page Template should use. By default the "_Layout.cshtml" is used in your MVC application however this can be overridden.
Reference another inline code Template as the Masterpage:
@{ Layout = Html.AgilityTemplatePath("Masterpage"); }
Reference another physical file in your MVC application:@{ Layout = "~/Views/Shared/_AlternateLayout.cshtml"; }
-
When complete click Save - allowing you to preview the page template in Preview Mode.
-
When ready to deploy changes to Live Mode click Publish to sync the template to your production web server.
Comments
Please sign in to leave a comment.