Inline Code - Create a Page Template

Follow

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).

 

  1. In the Settings section of Agility, select Page Templates and click on New Page Template.

  2. Name the template, select "Website" as the Digital Channel Type, and select "Inline Code" as the Output Type.

  3. Proceed to add at least one module zone.

  4. Click Save to create the Page Template and initialize the Inline Code file.

  5. Click Edit Inline Code to edit the generated Inline Code file.


  6. 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"; }
  7. When complete click Save - allowing you to preview the page template in Preview Mode.

  8. When ready to deploy changes to Live Mode click Publish to sync the template to your production web server.

0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.