Implementation of the basic CMSimple_XH functions in the new template
So that the basic structure of "template01" can be adapted to CMSimple_XH, some of the most important template tags are listed here with a brief explanation (source: Wiki http://www.cmsimple-xh.org/wiki/doku.php/de:template_tags ) .
(The full listing can be accessed via the link collection.)
Function | Status | Description |
---|---|---|
content() | necessary | Content of the page(s). |
editmenu() | no longer necessary |
Generates the admin menu in admin mode. (No longer required from CMSimple_XH 1.5 or CMSimple 4.0) |
head() | necessary | Generates style sheet, meta data and page title tags. |
languagemenu() | recommended | Provides links for multilingual sites. |
lastupdate() | recommended | Returns the time/date of the last change. |
li($hc,'menulevel') | optional | Generates menu including submenus. |
locator() | optional | Generates the locator (breadcrumbs). |
loginlink() | recommended | Displays the 'Login' link (if not logged in). |
mailformlink() | optional | Generates a link for the mail form if an email address is entered in the CMS configuration. |
nextpage() | optional | Generates a link to the next page. |
newsbox() | additionally | Returns the content of a 'hidden' page. |
onload() | necessary | Required in the body tag for editor functions. |
pagename() | optional | Shows the content of the configuration variable $cf['site']['title']. This variable is created from the $tx['site']['title'] language variable. If the title for a specific page is changed using the meta_tags plugin, the changed title will be displayed for that page. |
previouspage() | optional | Generates a link to the previous page. |
printlink() | optional | Generates a link for the print preview. |
searchbox() | optional | Generates the search field. |
sitemaplink() | optional | Returns a link to the sitemap. |
sitename() | optional | Shows the content of the language variable $tx['site']['title']. |
submenu() | optional | Generates links to subpages (if any). |
toc() | necessary | Generates the menu. For more design options, see "The CMSimple_XH menu" |
top() | optional | Generates a link to the top of the page (#TOP). |
Colour code: | violet | HTML tags used in the new template |
In "template01" the "mandatory" template tags are now added, e.g. with Notepad++, and some optional tags are added as examples. The scope of the optional and recommended template tags can be changed to customize the template to suit your own needs.
<head>
<!-- <link href="stylesheet.css" rel="stylesheet"> (commented out,
can also be deleted because this element is created dynamically
by CMSimple(_XH)) -->
<?php echo head();?>
</head>
<body <?php echo onload();?> >
...
<header class="header">
<?php echo sitename()?>
<!-- Header -->
</header> <!-- .header-->
...
<main class="content">
<?php echo content();?>
<!-- Content -->
</main> <!-- .content -->
...
<aside class="left-sidebar">
<?php echo searchbox();?>
<?php echo toc();?>
<?php echo sitemaplink();?>
<?php echo mailformlink();?>
(Admin area: Settings => CMS =>
Enter an e-mail address in the "e-mail form"!)
<!-- Left Sidebar -->
</aside> <!-- .left-sidebar -->
<aside class="right-sidebar">
<?php echo newsbox('News01');?>
<!-- Right Sidebar -->
</aside> <!-- .right-sidebar -->
...
<footer class="footer">
Powered by <a target="_blank"
href="http://www.cmsimple-xh.org/"> CMSimple_XH</a> |
<?php echo loginlink();?></div>
<!-- Footer -->
</footer> <!-- .footer -->
...
Please save the template so that all modifications are visible for the control view under Portable_XH.
"Portable_XH" is now called and the template "template01" is activated as the default template in the admin area of CMSimple_XH. After logging out (or in view mode), the result of the changes in the template (without changing the CSS formatting) is visible as follows: