CMSimple_XH
Functions
tplfuncs.php File Reference

Template functions. More...

Functions

 XH_renderPrevLink ()
 Renders the prev link. More...
 
 XH_renderNextLink ()
 Renders the next link. More...
 
 head ()
 Returns the complete HEAD element. More...
 
 sitename ()
 Returns the language dependend site title. More...
 
 pagename ()
 Returns the global site title. More...
 
 onload ()
 Returns the onload attribute for the body element. More...
 
 toc ($start=null, $end=null, $li='li')
 Returns the table of contents. More...
 
 li (array $ta, $st)
 Returns a menu structure of certain pages. More...
 
 XH_buildHc ()
 Sets global variables for CSS/DHTML menus. More...
 
 searchbox ()
 Returns the search form. More...
 
 sitemaplink ()
 Returns the sitemap link. More...
 
 printlink ()
 Returns the link for the print view. More...
 
 XH_printUrl ()
 Returns the URL of the print view. More...
 
 mailformlink ()
 Returns the link to the mail form. More...
 
 loginlink ()
 Returns the link to the login form. More...
 
 lastupdate ($br=null, $hour=null)
 Returns the date of the last update of the site. More...
 
 locator ()
 Returns the locator (breadcrumb navigation). More...
 
 editmenu ()
 Returns the admin menu. More...
 
 content ()
 Returns the contents area. More...
 
 submenu ($html='')
 Returns the submenu of a page. More...
 
 previouspage ()
 Returns a link to the previous page. More...
 
 nextpage ()
 Returns a link to the next page. More...
 
 top ($id='TOP')
 Returns a link to the top of the page. More...
 
 languagemenu ()
 Returns the language menu. More...
 
 XH_emergencyTemplate ()
 Provides a minimal template (in case template isn't found). More...
 
 poweredByLink ($linktext='')
 Creates the link to the generated page "Site/CMS Info". More...
 

Detailed Description

Template functions.

Author
Peter Harteg peter.nosp@m.@har.nosp@m.teg.d.nosp@m.k
The CMSimple_XH developers devs@.nosp@m.cmsi.nosp@m.mple-.nosp@m.xh.o.nosp@m.rg
See also
http://cmsimple-xh.org/

Function Documentation

◆ content()

content ( )

Returns the contents area.

Returns
string HTML

◆ editmenu()

editmenu ( )

Returns the admin menu.

Returns an empty string since XH 1.5, as the admin menu is automatically inserted to the template.

Returns
string HTML
See also
XH_adminMenu()
Deprecated:
since 1.7. Just remove from the template.

◆ head()

head ( )

Returns the complete HEAD element.

Returns
string HTML

◆ languagemenu()

languagemenu ( )

Returns the language menu.

Returns
string HTML

◆ lastupdate()

lastupdate (   $br = null,
  $hour = null 
)

Returns the date of the last update of the site.

Parameters
bool$brWhether to emit a br element between text and date.
int$hourThe time correction in hours.
Returns
string HTML

◆ li()

li ( array  $ta,
  $st 
)

Returns a menu structure of certain pages.

Parameters
array$taThe indexes of the pages.
mixed$stThe menu level to start with or the type of menu.
Returns
string HTML

◆ locator()

locator ( )

Returns the locator (breadcrumb navigation).

Returns
string HTML

◆ loginlink()

loginlink ( )

Returns the link to the login form.

Returns
string HTML

◆ mailformlink()

mailformlink ( )

Returns the link to the mail form.

Returns
string HTML

◆ nextpage()

nextpage ( )

Returns a link to the next page.

Returns
string HTML
See also
previouspage()

◆ onload()

onload ( )

Returns the onload attribute for the body element.

Returns
string HTML

◆ pagename()

pagename ( )

Returns the global site title.

Returns
string HTML

◆ poweredByLink()

poweredByLink (   $linktext = '')

Creates the link to the generated page "Site/CMS Info".

One of the 3 functions to create "Site/CMS Info".

Parameters
string$linktextThe text to be displayed as the link in the template.
Returns
string The link.
Since
1.7

◆ previouspage()

previouspage ( )

Returns a link to the previous page.

Returns
string HTML
See also
nextpage()

◆ printlink()

printlink ( )

Returns the link for the print view.

Returns
string HTML

◆ searchbox()

searchbox ( )

Returns the search form.

Returns
string HTML

◆ sitemaplink()

sitemaplink ( )

Returns the sitemap link.

Returns
string HTML

◆ sitename()

sitename ( )

Returns the language dependend site title.

Returns
string HTML

◆ submenu()

submenu (   $html = '')

Returns the submenu of a page.

Parameters
string$htmlOptional markup to wrap the heading.
Returns
string HTML

◆ toc()

toc (   $start = null,
  $end = null,
  $li = 'li' 
)

Returns the table of contents.

Parameters
int$startThe menu level to start with.
int$endThe menu level to end with.
callable$liA callback that actually creates the view.
Returns
string HTML

◆ top()

top (   $id = 'TOP')

Returns a link to the top of the page.

To work, an appropriate ID has to be defined in the template.

Parameters
string$idAn (X)HTML ID.

◆ XH_buildHc()

XH_buildHc ( )

Sets global variables for CSS/DHTML menus.

The most important variable is $hc, which is an array of page indexes of the pages of the menu. This is normally passed as first argument to li(), e.g. li($hc). $hl holds the number of these pages. $si holds the index of the current page within $hc; it might be useful for advanced menus.

Returns
void
Since
1.6.2

◆ XH_emergencyTemplate()

XH_emergencyTemplate ( )

Provides a minimal template (in case template isn't found).

Returns
void
Since
1.6.3

◆ XH_printUrl()

XH_printUrl ( )

Returns the URL of the print view.

Returns
string
Since
1.6

◆ XH_renderNextLink()

XH_renderNextLink ( )

Renders the next link.

Returns
string HTML
Since
1.6.3

◆ XH_renderPrevLink()

XH_renderPrevLink ( )

Renders the prev link.

Returns
string HTML
Since
1.6.3