Warning! Danger! Geek speak ahead!
- Working with WebEd 9, all the templates/ scripts/ styles can be stored into the database making maintenance easy.
- There are 2 templates types
- Page Template for any page layouts
- File Template
- WebEd 9 template support Razor Syntax and C#
- You can use most of the features of Razor including:
- You can define section to render between Page Template: http://weblogs.asp.net/scottgu/asp-net-mvc-3-layouts-and-sections-with-razor (*)
- You can also write C# code inside the template
- You can use most of the features of Razor including:
- Page Template can be either a Master Template (no parent) or a child template
- All the content will be placed in {RenderBody} curly bracket
- If the page template has a parent template, then all of its content (except the (*) section) will be placed in the {RenderBody} of the parent template
- All the content will be placed in {RenderBody} curly bracket
- There are some extended helpers you can use when editing page template
- You can add dynamic script and style (from Scripts and Styles modules) in the template, more information here: How to manage and use dynamic Script / Style in the CMS?
- Currently, there are 2 default templates for the system is:
- DefaultMasterTemplateWithRenderContentOnly: this is used for setup some initialize script and HTML for a page like:
- Edit / Create/ Login / Logout / Site map buttons
- Some script is the default script that the CMS need to use like some information about user logged-in, user groups, email and id
- This template will always render as the final template in the system
- Master: This is used to set up the master HTML of the application where you can define sections and body for the page
- DefaultMasterTemplateWithRenderContentOnly: this is used for setup some initialize script and HTML for a page like: