Special Tags

partialTop of Page

Returns the result of a view used as partial.

<!-- Returns the content of the view located in the folder : /themes/your_theme/views/default/header.php -->
<ion:partial view="default/header" />
AttributeOptionalValues
view no The path to the view, relative to the themes/your_theme/views folder.

From ionize 1.0.3, custom attributes can be added to the partial tag.
These attributes will be available in the partial view through the tag <ion:attr key="" />.

Example :

<!-- In the view called page_home.php -->
<ion:partial view="default/header" home="true" />

<!-- In the view called header.php -->
<ion:attr key="home" is="true">
<h1>Home page</h1>
</ion:attr>

uriTop of Page

Tag : <ion:uri />

Gives information about URI and the asked entity.

Get the URI entity type :

<!-- Returns 'page' if the URI asks for a page, 'article' if the URI asks for one article -->
<ion:uri:entity />

Make a test on the entity type :

<ion:uri:entity is="page">
This is a page
</ion:uri:entity>
<ion:else>
This is something else
</ion:else>

sessionTop of Page

This tag uses the Session library of CodeIgniter.
See : CodeIgniter Sessions

Set one session value

<-- Test of the session var called "my_var" -->
<ion:session:get key="my_var" is="false">

    <!-- Display this message if the session var isn't set -->
    <p class="red">"my_var" is not set.</p>
    <p>Reload the page to set it was just set.</p>

    <!-- Set the session var -->
    <ion:session:set key="my_var" value="1" />

</ion:session:get>

Get one session value

<!-- Display the session value -->
<p>
    Session value : <b><ion:session:get key="my_var" /></b>
</p>

set / getTop of Page

<ion:set /> and <ion:get /> can be used to set and get data.

Setting one value :

<ion:set key="my_var" value="The Value" />

Get one value :

<ion:get key="my_var" />

<ion:get /> can be used to get one field from its parent context tag data:

<!-- Get the ordering value of the page -->
<ion:page:get key="ordering" />

<!-- Test if the article link is one external one -->
<ion:article:get key="link_type" is="external">
... do something here
</ion:article:get>

traceTop of Page

<ion:trace /> is to be used in development, to see the content of data array.

This tag will output the data array.

<ion:article>
    <ion:trace />
</ion:article>