Website

These tags returns data about the website.

base_urlTop of Page

Returns the website base URL of the website.

home_urlTop of Page

Returns the website's home URL.

If more than one lang is defined, the lang code will be added to the URL for all languages which are not the default one.

For example, if the website has 2 languages, "en" and "de" with the default language "en", if one visitor visit one "de" page, the base URL will be http://domain.tld/de/.
If the visitor is one the "en" part of the wesbite, the base URL will be http://domain.tld/.

lang_urlTop of Page

If more than on language are defined for the website, the default lang will be added to the domain URL for all languages.

theme_urlTop of Page

Returns the website theme complete URL, with trailing slash. Useful for accessing assets (CSS, images).

Examples of return : http://your_domain.tld/themes/your_theme/

<html>
<head>
    <link rel="stylesheet" href="<ion:theme_url />assets/css/style.css" />
</head>

site_titleTop of Page

Returns the website title as set in Settings > Website settings...

Same as <ion:setting key="site_title" />

<ion:site_title />

browserTop of Page

Returns or makes one test on the current used browser.

<!-- Returns the current browser name -->
My browser is : <ion:browser />

<!-- Test on one Browser -->
<ion:browser method="browser" is="Firefox">

<!-- This is only displayed if the browser is Firefox -->
    <p>You're using Firefox</p>

</ion:browser>
AttributeOptionalValuesDescription
method yes is_browser
is_mobile
is_robot
is_referral
browser
version
mobile
robot
platform
referrer
agent_string
accept_lang
accept_charset
See http://codeigniter.com/user_guide/libraries/user_agent.html for all available methods.
value yes To be used with methods which accepts one input value, such as is_browser

settingTop of Page

Returns one website setting value

<ion:setting key="theme" />
AttributeOptionalValues
key no site_title : Website title
files_path : Media folder name, without trailing slash
theme : Current theme name
google_analytics : Google Analytics code

meta_titleTop of Page

Displays the window's browser's title of the displayed page.

This title can be set :

  • On articles : In "Window title"
  • One pages : In "Window title"

The displayed title is, in order :

  1. The current article's or page's "Window Title" value if not empty,
  2. else the article's or page's "Title"

If the attribute with_site_title is set to true :
The website's title defined in Settings > Website settings will be added before or after the displayed title.

<html>
<head>
    <title><ion:meta_title with_site_title="true" position="after" separator=" | " /></title>
</head>
AttributeOptionalValuesDescription
with_site_title yes true / false
Default value : false
Adds the website title to the page or article title
position yes before / after
Default value : before
To be use with the with_site_title attribute.
Position of the website title : Before or after the page or article window title.
separator yes Default value : ' - ' Separator between the website's title and the page or article window title.

meta_descriptionTop of Page

Displays the page or article META description set in Options > SEO > Description

If no description is set, displays the website's META description set in Settings > Website settings > Description

<html>
<head>
    <meta name="description" content="<ion:meta_description />" />
</head>

meta_keywordsTop of Page

Displays the page or article META description set in Options > SEO > Keywords

If no description is set, displays the website's META description set in Settings > Website settings > Keywords

<html>
<head>
    <meta name="keywords" content="<ion:meta_keywords />" />
</head>

current_langTop of Page

This tag is deprecated in 0.9.9.

You must use <ion:language:code /> instead.

See : Language Tags

google_analyticsTop of Page

Shortcut for <ion:setting item="google_analytics" />

Returns the Google Analytics code as set in the panel : Settings > Website settings > Statistics

<!-- Code in view -->

<ion:google_analytics />


<!-- Returns -->

<script type="text/javascript">
   var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
   document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
   var pageTracker = _gat._getTracker("UA-0000000-00");
   pageTracker._trackPageview();
</script>