Templates & NV tags
Navigate CMS has an exclusive parser that allows creating dynamic themes without the need of writing a single line of PHP. In fact, you cannot mix PHP code in your HTML templates: that won't work. All requests are treated by the nvweb parser, who finds and executes a certain action related to an object (a kind of controller) with some parameters. Let's see an example:
<h1>Welcome to our website!</h1> <div>Text describing the website</div>
How can we edit the title and text of this HTML file in Navigate CMS?
<nv object="nvweb" name="content" mode="title" /> <div><nv object="nvweb" name="content" mode="body" /></div>
We only have replaced the text in h1 and div for a call to a nv object named "content" requesting the "title" and "body" respectively.
Extending that idea you can request image galleries, menus, news lists, comments and even send a contact form!
Discover the full list of NV tags at the online reference http://nvtags.navigatecms.com
The purpose of a template is to use the same code in many pages. That means you'll have a template for your common content (About us), a template for the homepage, another for the contact form...
Navigate CMS has a set of predefined page types. This small feature imply the user can change the theme of his site, configure the global options and that's all; no need to change the template type on every content, no need to reupload all images...
Of course you are free to define your own and exclusive template type if your theme requires it.
List of templates types (as of Navigate CMS 2.5)
home content gallery blog blog_entry element (or "item") list product product_list cart checkout contact search newsletter portfolio portfolio_item not_found
Anatomy of a template
A template has the following parts:
- page type
- sections — you can differentiate between the "intro", the "main content" and even the "sidebar content" creating a different section for every one.
- properties — define the extra fields the user has to fill when creating a content with your template: head image, file to download...
- HTML code with nv tags
- Extra files: js, css