facebook: the meeting point ebay: the market place CMSimple: your home at the www

CMSimple - Documentation

information  documentation  downloads  forum
You are here:   Home > Templates > Template Designers > Template Functions
German CMSimple Website English Danish

Template Functions

These functions can be used inside template.html to build your own custom templates:


  • content('search highlight background','search highlight text')

Displays the content of CMSimple pages. This function is mostly used without parameters.

Accepted parameters:

  1. search results background:
    The background color of the text in the search results
  2. search results text:
    The text color in the search results

Example:

<?php echo content('#920','#fff');?>

Search results are shown in the text with dark red background color (#920) and white text color (#fff).

Without parameters, content() will show the search results with a yellow background color.

back to overview ⇑

  • head()

Inserts the html header in CMSimple pages.

Accepted parameters: none

Example:

<!DOCTYPE html>
<head>
<?php echo head();?>
</head>
...

back to overview ⇑


  • homelink('image')

Creates a link to the home page.

Accepted parameters:

  1. image: File name of the image or icon. The location of the image must be inside the template images folder.

Example:

<?php echo homelink('homelink.gif');?>

Without parameter, homelink() uses a language variable.

back to overview ⇑


  • languagemenu()

Inserts a language selection with flags for your CMSimple pages. Useful only for multilingual websites.

Accepted parameters: none

Usage:

<?php echo languagemenu();?>

back to overview ⇑


  • lastupdate()

Shows the date and time of the last page update (content.php).

Accepted parameters: none

Usage:

<?php echo lastupdate();?>

back to overview ⇑


  • locator('delimiter')

Creates a breadcrumb navigation (path navigation). This function is mostly used without parameters.

Accepted parameters:

  1. delimiter: the separator character used between the path elements
    Standard character: >

Example:

<?php echo locator('&lt;');?>

Without parameter, locator() uses the > (greater than) as the separator character.

You also can use a picture or icon as a separator. In the following example, the location of the picture locator.png is located inside the template images folder.

<?php echo locator('<img src="' . $pth['folder']['templateimages'] . 'locator.png" alt="delimiter">');?>

back to overview ⇑


  • loginlink()

Creates a link to the login page.

Accepted parameters: none

Usage:

<?php echo loginlink();?>

back to overview ⇑


  • mailformlink('image')

Creates a link to the CMSimple Mailform if an email address is entered in the CMS configuration.

Accepted parameters:

  1. image: File name of the image or icon. The location of the image must be inside the template images folder.

Example:

<?php echo mailformlink('mailformlink.gif');?>

Without parameter, mailformlink() uses a language variable.

back to overview ⇑


  • newsbox('pagename')

Displays the content of a CMSimple page. This function is often used to display latest news in a sidebar, as well for links to important pages, so actually for user behavior control.

Usually such news pages are hidden and not part of the website navigation menu.

Accepted parameters:

  1. pagename: Name of the page whose content is to be displayed. The page name must be written as it appears in the address bar of the browser.

Example:

<?php echo newsbox('News01');?>

Displays the content of the (hidden) page News01.

back to overview ⇑


  • nextpage('image')

Creates a link to the next page.

Accepted parameters:

  1. image: File name of the image or icon. The image location must be inside the template images folder.

Example:

<?php echo nextpage('next.gif');?>

Without parameter, nextpage() uses a language variable.

back to overview ⇑


  • onload()

As of CMSimple 4.6. this function is no longer necessary. However, it should still be used in the body tag for backwards compatibility. Otherwise the editor will not work in versions older than CMSimple 4.6.

Accepted parameters: none

Usage: in the body-tag

<body id="body" <?php echo onload();?>>

back to overview ⇑


  • pagename()

Inserts the title of the current loaded CMSimple page.

Accepted parameters: none

Usage:

<?php echo pagename();?>

back to overview ⇑


  • previouspage('image')

Creates a link to the previous page.

Accepted parameters:

  1. image: File name of the image or icon. The location of the image must be inside the template images folder.

Example:

<?php echo previouspage('prev.gif');?>

Without parameter, previouspage() uses a language variable.

back to overview ⇑


  • printlink('image')

Creates a link to the print preview.

Accepted parameters:

  1. image: File name of the image or icon. The location of the image must be inside the template images folder.

Example:

<?php echo printlink('printlink.gif');?>

Without parameter, printlink() uses a language variable.

back to overview ⇑


  • searchbox()

Creates a search bar for the CMSimple website search.

Accepted parameters: none

Usage:

<?php echo searchbox();?>

back to overview ⇑


  • sitemaplink('image')

Creates a link to the CMSimple website index (sitemap).

Accepted parameters:

  1. image: File name of the image or icon. The location of the image must be inside the template images folder.

Example:

<?php echo sitemaplink('sitemaplink.gif');?>

Without parameter, sitemaplink() uses a language variable.

back to overview ⇑


  • sitename()

Inserts the title of the CMSimple website.

Accepted parameters: none

Usage: Usually in the header of the page, formatted with h1 heading tag

<h1><?php echo sitename();?></h1>

back to overview ⇑

  • submenu()

Generates a menu to the subpages of the current CMSimple page, if available.

Accepted parameters: none

Usage:

<?php echo submenu();?>

back to overview ⇑


  • toc(menulevel from,menulevel up to,opentoc)

Displays the CMSimple main menu (pages menu). This function is mostly used without parameters.

Accepted parameters:

  1. menulevel from: lowest displayed menu level
    default: 1
  2. menulevel up to: highest displayed menu level
    default: accordingly to the CMS configuration
  3. opentoc:
    0 => dynamic menu
    1 => open menu
    default: 0

Example:

<?php echo toc(1,2,1);?>

Displays the CMSimple pages menu from menu level 1 to menu level 2, as an open menu. Pages of menu level 3 and higher are not displayed.

Without parameters, toc() creates a dynamic menu across all menu levels.

back to overview ⇑


  • top('image')

Creates a link to the beginning of a page or to an html element with id = "TOP".

Accepted parameters:

  1. image: File name of the image or icon. The location of the image must be inside the template images folder.

Example:

<?php echo top('top.gif');?>

Without parameter, top() uses a language variable.

back to overview ⇑

« prev top next »

CMSimple News

CMSimple is ready for php 7.3
System Requirements »

CMSimple 4.8 published

2019-10-14

CMSimple 4.8 with a new Backup Manager and new language files is available for download.

An "easy to install" update CMSimple 4.0 => 4.8 also is available.

Download Area »

NEW from 4.7.6: Admin Login

Since CMSimple 4.7.6, you can lock the permission to configure CMSimple and plugins for authors, and set up an admin login. The admin is allowed to do everything.

more information »

Services

Just to avoid misunderstandings: The firms listed below are no hotlines for free. Therefor the forum » is available.


ge-webdesign.de offers:

ge-webdesign.de

Templates

Responsive templates are suitable for all visual output devices, from smartphones up to HD screen.

Test the responsive templates of ge-webdesign.de:

Demos & Downloads »

Plugins

With plugins you can extend the functionality of CMSimple. There are Blogs, Comments, Photo Galleries, MultiMedia, MembersArea and much more.

Here you can find demos for most of the available plugins:

Demos & Downloads »

Sponsors Area

This is the place for banners and links to sponsors of CMSimple or any kind of advertising.

Become a CMSimple Sponsor »

You also can support CMSimple by a PayPal donation: