CMSimple - flatfile CMS - Documentation

Flatfile CMS Blog Shop - The Content Management System to take away

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: Mostly in the header of the page

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 8.3.9
System Requirements »

CMSimple 5.16 published

2024-07-22

CMSimple 5.16 contains many small improvements, some suggested in the forum and from the development of CMSimple Basic.

Download Area »

USBWebserver CMSimple

USBWebserver

Testen Sie CMSimple ganz einfach mit USBWebserver offline auf Ihrem PC.

OnlineShop für CMSimple

OnlineShop für CMSimple

Jetzt gibt es bei ge-webdesign.de den csvShop, ein OnlineShop Plugin für CMSimple. Selbstverständlich voll responsiv für Smartphones & Co.

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 donation:

nach oben