<p>Here we explain the tags that are used in the default templates that are specific to templates in CMS Made Simple. The rest of the templates are just pure HTML. You can read more about that in the {cms_selflink ext='http://wiki.cmsmadesimple.org/index.php/User_Handbook/Getting_Started/Designer/Templates' text='documentation wiki'}.</p>
<div class="templatecode">
<h3>Page title</h3>
<pre>&lt;title&gt;{ldelim}sitename} - {ldelim}title}&lt;/title&gt;
</pre>
<p>For each page using these tags in a template the tags are replaced with the site name you specify in Site Admin &raquo; Global settings and the title you specify when you add/edit each page.</p>
<p><em>Read more</em> about the <code>{ldelim}sitename}</code> and <code>{ldelim}title}</code> tags in Extensions &raquo; Tags in the Admin Panel.</p>
</div>
<div class="templatecode">
<h3>Metadata</h3>
<pre>{ldelim}metadata}
</pre>
<p>This tag adds to your page any metadata that you have specified in Site Admin &raquo; Global settings and also page specific metadata that you can add under the Options tab when adding/editing a page.</p>
<p>It is also used for knowing the base folder for your site when using pretty URLs. So don't remove this if you use Pretty URLs!</p>
<p><em>Read more</em> about the <code>{ldelim}metadata}</code>tag in Extensions &raquo; Tags in the Admin Panel.</p>
</div>
<div class="templatecode">
<h3>Stylesheets</h3>
<pre>{ldelim}stylesheet}
</pre>
<p>This tag links to all style sheets (CSS) that you have attached to a template. It means that you only have to add this tag once and all attached style sheets will be linked to automatically.</p>
<p><em>Read more</em> about the <code>{ldelim}stylesheet}</code> tag in Extensions &raquo; Tags in the Admin Panel.</p>
</div>
<div class="templatecode">
<h3>Relational links</h3>
<pre>{ldelim}cms_selflink dir="start" rellink=1}
{ldelim}cms_selflink dir="prev" rellink=1}
{ldelim}cms_selflink dir="next" rellink=1}
</pre>
<p>These are relational links for interconnections between pages, which is good for accessibility and Search Engine Optmization</p>
<p><em>Read more</em> about the <code>{ldelim}cms_selflink}</code> tag in Extensions &raquo; Tags in the Admin Panel.</p>
</div>
<div class="templatecode">
<h3>Page width in Internet Explorer 6</h3>
<pre>{ldelim}literal}
&lt;script type="text/JavaScript"&gt;
&lt;!--
//pass min and max -measured against window width
function P7_MinMaxW(a,b){ldelim}
	var nw="auto",w=document.documentElement.clientWidth;
	if(w&gt;=b){ldelim}nw=b+"px";}if(w&lt;=a){ldelim}nw=a+"px";}return nw;
}
//--&gt;
&lt;/script&gt;
&lt;!--[if lte IE 6]&gt;
&lt;style type="text/css"&gt;
#pagewrapper {ldelim}width:expression(P7_MinMaxW(720,950));}
#container {ldelim}height: 1%;}
&lt;/style&gt;
&lt;![endif]--&gt;
{ldelim}/literal}</pre>
<p>This isn't a tag really, but displays how to insert JavaScript in a CMSMS template.</p>
<p>The default templates use fluid page width. But Internet Explorer 6 doesn't understand min-width and max-width, so for that browser the min and max page width is set with this JavaScript. For other browsers the page width is set in the style sheets beginning with "Layout: ..."</p>
</div>
<div class="templatecode">
<h3>Skip links for accessibility</h3>
<pre>{ldelim}anchor anchor='main' title='Skip to content' accesskey='s' text='Skip to content'}
</pre>
<p>Anchor links (links to an anchor in the same page) are inserted with the <code>{ldelim}anchor}</code> tag. In the default templates this is used for skip links that are visible to screen readers, but hidden with CSS to visual browsers.</p>
<p><em>Read more</em> about the <code>{ldelim}anchor}</code> tag in Extensions &raquo; Tags in the Admin Panel.</p>
</div>
<div class="templatecode">
<h3>Header with logo image that links to default page</h3>
<pre>{ldelim}cms_selflink dir="start" text="$sitename"}
</pre>
<p>In the header the &lt;h1&gt; tag (hidden by CSS) is a link to the page that is selected as the default page. The <code>dir="start"</code> parameter in the {ldelim}cms_selflink} tag is used for this. To get the site name as the text for the link, the <code>$sitename</code> variable is used.</p>
<p><em>Read more</em> about the <code>{ldelim}cms_selflink}</code> tag in Extensions &raquo; Tags in the Admin Panel.</p>
</div>
<div class="templatecode">
<h3>Search</h3>
<pre>{ldelim}search}
</pre>
<p>To insert a search form on your site, simply use the {ldelim}search} tag. Search is actually a module and should therefore be called as a parameter in the {ldelim}cms_module} tag, like this: <code>{ldelim}cms_module module='search'}</code>. But to simplify matters, we did a wrapper tag so that it's easier to remember.</p>
<p><em>Read more</em> about the Search module in Extensions &raquo; Modules in the Admin Panel.</p>
</div>
<div class="templatecode">
<h3>Breadcrumbs</h3>
<pre>{ldelim}breadcrumbs starttext='You are here' root='Home' delimiter='&raquo;'}
</pre>
<p>Breadcrumbs is a path to the current page. In the default templates we have chosen to put the text 'You are here' before the path and force 'Home' to always be the root in the path, even if it isn't. With the delimiter parameter you can select the delimiter that separates entries in the path.</p>
<p><em>Read more</em> about the <code>{ldelim}breadcrumbs}</code> tag in Extensions &raquo; Tags in the Admin Panel.</p>
</div>
<div class="templatecode">
<h3>Navigation</h3>
<pre>{ldelim}menu template='simple navigation.tpl' collapse='1'}
</pre>
<p>This is how you insert a menu where you want it to appear. Like the <code>{ldelim}search}</code> tag, this is actually just a wrapper tag, as the Menu Manager is a module.</p>
<p>In the default templates the menu manager template that is used for the menus are stored in files. That's why you see the .tpl extension in the template parameter. But you can easily import menu templates to the database and edit them directly in the Admin Panel. Then you simply omit the .tpl extension in the template parameter.</p>
<p><em>Read more</em> about the Menu Manager module in Extensions &raquo; Modules in the Admin Panel.</p>
</div>
<div class="templatecode">
<h3>News</h3>
<pre>{ldelim}news number='3' detailpage='news'}
</pre>
<p>This tag will display the last three news articles. When clicking a news article to read the details, it is opened on the page with the page alias 'news'. That's what the detailpage parameter is doing.</p>
<p>Like all core modules there is a wrapper tag for the News module, to make it easier to use.</p>
<p><em>Read more</em> about the News module tag in Extensions &raquo; News in the Admin Panel.</p>
</div>
<div class="templatecode">
<h3>Print button</h3>
<pre>{ldelim}print showbutton=true script=true}
</pre>
<p>The <code>{ldelim}print}</code> tag is used to insert a print link. With the showbutton parameter set to true we have told the tag to output a button instead of text. The script parameter set to true means the print dialog window opens when clicking the button, for immediate printing.</p>
<p>The <code>{ldelim}print}</code> tag prints everything that is in your <code>{ldelim}content}</code> tag, that is only the content for a page.</p>
<p><em>Read more</em> about the <code>{ldelim}print}</code> tag in Extensions &raquo; Tags in the Admin Panel.</p>
</div>
<div class="templatecode">
<h3>Page content</h3>
<pre>&lt;h2&gt;{ldelim}title}&lt;/h2&gt;
{ldelim}content}</pre>
<p>Maybe the most important tag in your template. Where you put the <code>{ldelim}content}</code> is where the content for your page will appear.</p>
<p>We have also chosen to put the page title on every page (the <code>{ldelim}title}</code> tag), so that you don't have to put that in the content for every page.</p>
<p><em>Read more</em> about the <code>{ldelim}content}</code> and <code>{ldelim}title}</code> tags in Extensions &raquo; Tags in the Admin Panel.</p>
</div>
<div class="templatecode">
<h3>Previous/next links</h3>
<pre>{ldelim}anchor anchor='main' text='^ Top'}
{ldelim}cms_selflink dir="previous" label="Previous page: "}
{ldelim}cms_selflink dir="next"}
</pre>
<p>Some more internal links. These are using the dir parameter to link to the previous and next pages in the page hierarchy (separators and section headers will be omitted as they are no pages).</p>
</div>
<div class="templatecode">
<h3>Page footer</h3>
<pre>{ldelim}global_content name='footer'}</pre>
<p>Instead of bloating your template with lots of code you can put some code in a Global Content Block. Then call that Global Content Block with the <code>{ldelim}global_content}</code> tag. It's also useful for content or HTML code that is reused on several pages or templates.</p>
<p>In the default templates we have put the footer text in a Global Content Block with the name 'footer'. You find the Global Content Blocks in the Content menu in the Admin Panel.</p>
<p><em>Read more</em> about the <code>{ldelim}global_content}</code> tag in Extensions &raquo; Tags in the Admin Panel.</p>
</div>