Table of Contents
- Main page
- For All Users
- For Designers
- For Developers
- For Editors of this wiki
This page in: English - Deutsch - Español - Français - Italiano - Lietuvių - Nederlands - Norsk - Polski - Русский - Svenska - Tiếng Việt - عربي - 日本語 简体中文
Templates
- To define how each page of your site will look, the editor selects what template to use for each page. How the available templates will look is the work of the designer.
- As already mentioned in I am a designer the template gives only the structure of the page, that is what will be included in a page. Through the stylesheets you can then design that structure, to get the look and feel that you want.
- Ok, so how do you create a template in CMS Made Simple? It's quite simple. You use plain HTML and put placeholders for the content, the menu etc. When a user is visiting your site the page is automatically generated from the template and the placeholders are filled with the content. To get the idea of how this works, look at how the default templates are built.
- This means that you can take a layout from any page that you like and easily make a template for your CMSMS pages.
Common tags used in CMS Made Simple templates
- These are the most common tags to use as placeholders in a template:
- {title} - will be replaced by the title of the content (You can set title when creating content pages).
- {stylesheet} - This must be between the <head> tags. It links all the stylesheets that you have attached to your template. If you forget this your page will appear without styles. If you rather want to use external stylesheets you can a normal <link/> tag in the header.
- [0.13+] {metadata} - This must be between the <head> tags as well. It will link in site and page specific metadata and also exports a <base> tag that is necessary for hierarchical url structures.
- {content} - This will be replaced by the real content of the selected page, the content that you edit for each page in Content -> Pages.
- {breadcrumbs} - Will be replaced by a path to the selected content.
- {cms_module module='menumanager'} - This is the main system for display menus. It's a little too complex to discuss here and you should read it's help section in "Extensions/Modules/Menu Manager". This is an example of how to insert a module in your template.
How do you know what placeholders that you can use in a template?
- You find a long list of tags in the "Extensions/Tags" menu in the Admin Console. Examples of these are {title}, {stylesheet} and {metadata}. Click on their Help links to see how they are used.
- You can make your own User-defined Tags in "Extensions/User Defined Tags". To use a "User Defined Tag", just insert their names like this {userdefinedtag}.
- Modules are inserted in your pages by using a tag like {cms_module module='modulename'}. See how they are used in their help files in "Extensions/Modules" and clicking the appropriate help-link.
- For many tags and modules you can use parameters, such as {tagname parameter='value'}.
Attaching stylesheets
- To style the elements of your template and to position the div elements, you attach one or more stylesheets to your template. In the list of templates "Layout/Templates", click on the CSS icon to the right of a template. Select the stylesheets to attach to the template from the available stylesheets in the dropdown list and click "Add Stylesheet".
This page in:
English -
Deutsch -
Español -
Français -
Italiano -
Lietuvių -
Nederlands -
Norsk -
Polski -
Česky -
Русский -
Svenska -
Tiếng Việt -
عربي -
日本語
简体中文