cms.libe.net has some build in  templates, they can be selected in "Settings" "change layout"

If you hava a little html and css knowledge you can create or customize templates.
A source code editor is also available online via "Settings", "Change Layout", "EDIT"

    

(This assumes, of course, write access to the respective files of the template: chmod)

the Folder: template

this is where the Templates resides

a template consists of at least the following files (color coded)

 

and usually from a few image files, or other template files (css, ...) as shown in this screenshot.

 

File Description
index.php this is called when the respective template is selected (active)
template_mini.png Screenshot: thumbnail of templates for template selection in the "change layout" menu
template_description.htm Description for the template (used in "change layout")
tinymce.css css Files for TinyMCE Editor (to adapt TinyMCE to the template)
cms-default.png

Standardbild: is used for menu overview when in the article is no image.

create a template

just copy an existing template or create a new folder with the files described above.

Content of the index.php File:

the index.php contains the HTML code, Variables, and menus can be loaded via php code
that is, A standard HTML template (without the php code) can be easily copied into a template folder and be filled with the following variables:

Path root / Template

to guarantee that the path to external files is correct you should use the following variables:

<?php echo $firstparturl;?> is the path to the root directory of the website

<?php echo $firstparturl,$templatedir;?> is the path to your own template directory
for example, can css files (in the template folder) be integrated as follows:

<link rel="stylesheet" type="text/css" href="<?php echo $firstparturl,$templatedir;?>main.css" />

that is, is an HTML template taken as a template, we need only <?php echo $firstparturl,$templatedir;?> before each Insert file that is loaded with HTML (if this is in the template folder)

 

Javascript residing in the plugin folder looks like this:

<script type="text/javascript" src="<?php echo $firstparturl;?>plugins/jquery/jquery-1.7.2.min.js"></script>

Variables / Arrays

Variables Description html Code
$firstparturl absolute Path to the Root URL

<?php echo $firstparturl;?>

writes for example: http://www.libe.net

$templatedir Path to the used template, mostly used together with $firstparturl

<?php echo $firstparturl,$templatedir;?>

writes for example: http://www.libe.net/templates/mytemplate/

$templatename the name of the used template

<?php echo $templatename;?>

in the previous used example: mytemplate

$title Title of the page (can be edited in Editor)   <title><?php echo $title;?></title>
$menutitle

in Editor:  

<?php echo $menutitle;?>
$smalldescription

short description:

   

<?php echo $smalldescription;?>
$addfeedback <?php echo $addfeedback;?>
$meta

Meta Description of the Page:

<?php if (!empty($meta)) echo "<meta name=\"description\" content=\"", $meta,"\" />";?>
$page_title Title of the whole Page, found in Settings    <?php echo $page_titel;?>
$page_description Description of the whole Page, found in Settings  <?php echo $page_description;?>
$start is 1 if it is the startpage  <?php if ($start==1) ... ?>
$text

Shows the Content of the Article, defined in TinyMCE Editor:   

<?php echo $text;?>
$backlink

Link to the Main Menu, Example :HOME > Menu > Submenu

 

to manipulate the HTML_Code use the breadcrumb function instead

<?php if (!empty($article)) echo $backlink;?>
$prev_topic Link to the previous article in this menu <?php if (!empty($prev_topic)) echo "<", $prev_topic, " ";?>
$next_topic Link to the next article in this menu <?php if (!empty($next_topic)) echo " ", $next_topic, ">";?>
$existing_sub

gets the value 1 if an submenu exists

<?php if ($existing_sub==1) ... ?>
$level

has the value of the Link Depth: HOME = 0; 

Main menu = 1
Submenu of the main menu = 2
Submenu of submenu of the main menu = 3

 <?php if ($level==1) ...?> the active article is a main menu of the 1 st level (link depth)
$menuforlevel[$level] Shows the title ("title for menu items") of a main menu for a particular submenu   <?php echo $menuforlevel[1];?> Title of the main menu of the 1 st level (link depth) if a submenu of the main menu is selected
$menubackforlevel[$level]    
$arrayforlevel[$level]    
$arrayback[$level]    
$urlforlevel[$level] Displays the URL of a main menu for a particular submenu

<?php echo $firstparturl,$urlforlevel[1];?> first link depth

<?php echo $firstparturl,$urlforlevel[$level];?> currently active level

<?php echo $firstparturl,$urlforlevel[$level-1];?> Hauptmenü der aktiven Ebene (eine Ebene drüber)

Main menu of the active article (an article over it)

$titleforlevel[$level] Shows the title ("Title") of a main menu for a particular submenu <?php echo $titelforlevel[1];?> or <?php echo $titelforlevel[$level];?>  ...

Systemvariblen:

$article variable is created out of the url: is the last part of $_SERVER['REQUEST_URI']

$file is like $article and in addition has the startpage included

 

Systemarrays: $menuarray, $previewarray, $titlearray,$titlemenuarray, $menulevel, $datumarray, $fileandpathnamearray, $smalldescriptionarray, $newsentryarray

Functions

New since version 1.40: Global Variables to manipulate the html-Sourcecode or css classes ($ css_class_ ..., $ html_template, ...?) This "global" variables must be defined simply before the function is called.

Function Description html Code
buildmenu($startlevel, $endlevel, $endlevel_active_menu)

generates links of a mainmenu

startlevel:1 means menu from the beginning first level; endlevel: 0 (unlimited): shows all submenus; Usecase is a Articleoverview and thumbnails of the articles.  It can also be used for a mainmenu but it is not optimized for nested menus

 

creates menu links
start: 1 means Menu from the 1 st level (main menu), end: 0 (unlimited): thus shows all submenus; Should be used with thumbnails for menu overview, but can also be used for the main menu (but not nested)

 

Global Variables:

$css_class_a_active

$css_class_a

$css_clearfix_tag

$css_clearfix

$html_template

 

HTML Template:

$html_template="<tr><td style=\"text-align:center\"><div class=\"level_%menulevel%_%start_level%%end_level%%end_this%\" style=\"max-height:150;overflow:hidden;float:left;\"><a class=\"%activeclass%\" href=\"%linkurl%\"><img width=\"150\" alt=\"%titlemenu%\" src=\"%image150%\"></a></div></td>

 

HTML Template Variables

%menulevel%

%start_level%

%end_level%

%end_this%

%activeclass%

%linkurl%

%title%

%titlemenu%

%smalldescription%

%image150%

%image500%

%datetime%

%textpagebreak%

<?php echo buildmenu(1,1,0);?> startlevel:1 means Menu beginning  from the 1 st level (main menu), 

endlevel: 1 means only main menu;

endlevel_active_menu = 0 shows submenus when they are active.

 

buildmenuul($endlevel, $submenu,$collapse,$limit)

generates a menu or nested menu list <ul><li>: buildmenuul should be used for the main menu of the page (can also be a dropdown menu).

$endlevel: 0 .. unlimited: 1: only for main menues; 2: main menu and first sub level

 

in addition the following global variables can be used:

 

Global Variables:

$css_class_a_active

$css_class_a

$css_class_li_active

$css_class_li

$css_class_dropdown

$css_class_dropdown_depth

$css_class_ul_level[$level]

css_class_li_level[$level]

$css_class_a_level[$level]

 <?php echo "<ul>".buildmenuul(1,0,3)."</ul>";?> 

Dropdownmenu and no submenues, collapse sub menus to level 3

 

 <?php echo "<ul>".buildmenuul(3, "custommenu")."</ul>";?> Dropdownmenu mit Untermenüs bis Untermenüebene 3 (level 3) beginnend von einem ausgeblendeten Menüeintrag:

 

Beispiel für "Menü bearbeiten"

'custommenu

-1ter Eintrag

zusätzliche Menüs sollten am Anfang definiert werden.

 

<?php echo buildmenuul(3, $disabledmenu);?>

dieses Beispiel würde das "custommenu nur laden, wenn wir uns auf einem Beitrag dieses Menüs befinden, laut unserem Beispiel z.B. auf 1ter Eintrag siehe auch: mehrere-Menüs-erstellen

 

Zusätzlich können folgende Variablen übergeben werden:

$start_level=?;

 

 breadcrumb("html_template")

Breadcrumb Menü, ähnlich der Variable: $backlink, der HTML Code kann aber frei definiert werden: 

 

HTML_Template

$html_template="<li><a href=\"%linkurl%\">%titlemenu%</a></li>";

 

Variablen für html_template:

%linkurl%

%title%

%titlemenu%

 

 

<ol class=\"breadcrumb\">

 

<?php echo breadcrumb("<li><a href=\"%linkurl%\">%titlemenu%</a></li>");?>

 

<?php echo "<li class=\"active\">$titel</li>";?>

 

</ol>

 

prev_topic($htmltemplate)

HTML Template

$html_template="<a href=\"%linkurl%\" class=\"prev_topic\">%titlemenu%</a>\n";

 

Variablen für html_template:

%linkurl%

%title%

%titlemenu%

 
next_topic($htmltemplate)

HTML Template

$html_template="<a href=\"%linkurl%\" class=\"next_topic\">%titlemenu%</a>\n";

 

Variablen für html_template:

%linkurl%

%title%

%titlemenu%

 
loadcontent("artikelname")

mit loadcontent kann der Inhalt eines Themas eingefügt werden: somit ist es möglich im Menü einzelne Themen für Bereiche der Webseite anzulegen: z.B:

'oben

'rechts

'additional-area

(' bedeutet: wird im Menü nicht angezeigt)

<?php echo loadcontent("additional-area");?>
singlelink("link")

Erzeugt einen Link auf einen Artikel der nicht im Menü vorkommt, z.B. für Impressum, ... (Im Editor erscheinen diese Artikel neben der Startseite)

 

HTML Template

$html_template="<a href=\"%linkurl%\">%title%</a>";

 

Variablen für html_template:

%linkurl%

%title%

%titlemenu%

%smalldescription%

 

 

<?php echo singlelink("testlink");?>
newest($maxentries, $start, $images, $layout)

mit Newest können Artikel angezeigt werden, bei denen "Eintrag auf der Startseite" ausgewählt wurde.

 

Globale Variablen:

$css_clearfix_tag

$css_clearfix

 

$html_template="<li class=\"newest1\"><div class=\"nimage\"><a href=\"%linkurl%\"><img width=\"150\" alt=\"%titlemenu%\" src=\"%image150%\"></a></div>
<span class=\"ndate\">%datetime%</span>
<span class=\"ndesc\"><a href=\"%linkurl%\">%titlemenu%</a></span>
<span class=\"ntext\">%textpagebreak%<span class=\"nlink\"><a href=\"%linkurl%\">%smalldescription%</a></span>
</span>
</li>";

 

Variablen für html_template

%linkurl%

%title%

%titlemenu%

%smalldescription%

%image150%

%datetime%

%textpagebreak% 

<?php echo newest(3,0,1,12);?>

erzeugt dann 3 Newseinträge startend beim neuesten, inklusive Miniaturimages;

Layout: 12: 1erste Zeile ein Eintrag, 2te Zeile 2

 

<?php echo newest(3,0);?> würde nur einfach Links ohne Bilder erzeugen. 

 

 

Systemfunktionen: encodeurl / decodeurl / to_unixtime / rrmdir / multiimagerename / multiimagerotate / imagefilerotate

Placeholder html_template 

new since Version 1.40 in some Plugins the HTML Source code can be defined using the variable: $html_template see Functions

Placeholder Description Screenshot
%textpagebreak% in Editor Text: <!-- pagebreak -->
%title% in Editor: "Titel"
%titlemenu% in Editor: Titel for Menuentries (rename Entry): 
%smalldescription% in Editor: Short Descritption
%image150% Picture in Size 150px (use the image as Preview, take a look at the mousecurser in the Screenshot on the righthand-->) 
%datetime% in Editor: Date and Time 

%menulevel%

%start_level%

%end_level%

%end_this%

%activeclass%

   

 

HTML construction kit

HTML construction kit

HTML construction kit


multiple Menus

multiple Menus

multiple Menus