Ionize User Guide Version 0.9.6


Shared Tags : Page, Article, Media

Shared tags can be used in several context.

They display the same logical information.

For example, the title tag displays the title of an element and can be used in the page, article or media context.

<html>
   <body>
      
      <!-- Displays the page title (context of the page) -->
      <ion:title />
      
      <!-- Loop through articles -->
      <ion:articles>
         
         <!-- Displays the article title, because we loop through articles -->
         <ion:title />

         <!-- Loop on pictures of each article -->
         <ion:medias type="picture">

            <!-- Displays the media title, because we loop through media -->
            <ion:title />

         </ion:medias>
      
      </ion:articles>

   </body>

title

Returns the element title.

Context of usage :

<!-- Returns the title -->
<ion:title/>

<!-- Returns : <h2 id="my_title_id" class="my_title_class">Your title</h2> or nothing if there is no value set for the title. --> 
<ion:title tag="h1" id="my_title_id" class="my_title_class" />
Attribute Optional Values
tag yes Puts the results into the given tag
id yes Adds the HTML id attributes to the produced tag.
class yes Adds the HTML class attributes to the produced tag.

subtitle

This tag is working like the <ion:title /> tag.