M.Zharkikh's personal site logo
Mail to site
Print version
News (RSS)
Smereka / Smeretags / Static smeretags

Smereka

Smeretags

Static smeretags

Static smeretags not depend on the context node they always return a value for the site configuration.

GetCommonURL

Module: smeretags/substfields.php (available by default)

Options: no.

Purpose: returns the URL of common directory for Smereka sites (all sites that shared one root directory of the web server). Value end with slash (/).

Example call: <Smereka Func="GetCommonURL" />

Example result:

GetDomainURL

Module: smeretags/substfields.php (available by default)

Options: no.

Purpose: returns the domain name in the context of invocation. Value end with slash (/).

Example call: <Smereka Func="GetDomainURL" />

Example result:

GetFavicon

Module: smeretags/substfields.php (available by default)

Options: no.

Purpose: for a given node generates HTML code for the icon value set for subdomains, to which the node belongs (if exists and contains icon definition) or domain (if it contains icon definition). If the icon is not specified neither in the subdomain nor in domain returns empty string.

Example call: <Smereka Func="GetFavicon" />

Example result:

<link rel="shortcut icon" media="all"
href=""
type="image/x-icon" />
<link rel="icon" media="all"
href=""
type="image/x-icon" />

GetHomeURL

Module: smeretags/substfields.php (available by default)

Options: LangAware, Subdomain.

Purpose: Returns the URL of the root page in the invocation context. Value end with. If the DEFAULT_SUBDOMAIN (Eg www) site constant is defined, then the resulting address will always contain this subdomain. If the parameter Subdomain explicitly defined, the resulting address will contain it. If given the option LangAware resulting address will contain the current language suffix (the language, which is calculated in the invocation context). If the current language matches the default language, this suffix is not included.

Example call: <Smereka Func="GetHomeURL" />

Example result:

Example call: <Smereka Func="GetHomeURL" Subdomain="lib" LangAware="1" />

Example result:

GetLang

Module: smeretags/substfields.php (available by default)

Options: No.

Purpose: Returns the current language (the language of invocation context).

Example call: <Smereka Func="GetLang" />

Example result: uk

GetMainURL

Module: smeretags/substfields.php (available by default)

Options: no.

Purpose: returns URL of the personal directory of the Smereka site (directory, that contain static files for this site). Value end with slash (/).

Example call: <Smereka Func="GetMainURL" />

Example result:

GetSmerekaVersion

Module: smeretags/substfields.php (available by default)

Options: no.

Purpose: returns the current Smereka version.

Example call: <Smereka Func="GetSmerekaVersion" />

Example result: Smereka 1.7 beta

GetSubdomName

Module: smeretags/substfields.php (available by default)

Options: No.

Purpose: Returns the current subdomain.

Example call: <Smereka Func="GetSubdomName" />

Example result: www

Previous section | Table of content | Next section

Please this page? Help us to develop this site!

1978 2018 N.I.Zharkikh

Reprinting of articles from site are encouraged while
reference (hyperlink) to my site is provided

Site powered by

Load count : 1654

Modified : 8.08.2017

If you look up the type error
on this page, please select it
by mouse and press Ctrl+Enter.