− Table of content
Meta plugins allows to set meta properties on the template, usable by the template consumer code, or to modify automatically some other objects.
meta_html ¶
This is a plugin allowing to modify and setup the current response object.
title ¶
To setup the <title>
tag of your page, you just need to do as follow :
{meta_html title 'Page Title'}
assets ¶
To use an assets group, and so to integrate all of its JS
and CSS links, use assets
:
{meta_html assets 'example'}
jQuery ¶
To add the links of jQuery in the header of your page, you just need to do as follow:
{meta_html jquery}
jQueryUI ¶
To add the links of jQueryUI in the header of your page, you just need to do as follow :
{meta_html jquery_ui 'components', array('widget','dialog','position')}
{meta_html jquery_ui 'theme'}
will load jquery, jqueryUI core and specified components + theme
js ¶
to load a javascript file, you just need to do as follow:
{meta_html js $j_basepath.'js/global.js', array('charset'=> 'UTF-8')}
The second parameter has to be an array, it is optionnal, and allow to pass
additionnal attributes to the <script>
tag.
jsie ¶
To load a javascript file targeting Internet Explorer, you just need to do as follow:
{meta_html jsie $j_basepath.'js/globalie.js', array('charset'=> 'UTF-8')}
css ¶
to load a CSS stylesheet, you just need to do as follow:
{meta_html css $j_basepath.'css/screen.css', array('media'=>'screen, projection')}
the second parameter has to be an array, it is optionnal, and allow to pass
additionnal attributes to the <link>
tag.
cssie ¶
To load a CSS stylesheet targeting Internet Explorer, you just need to do as follow:
{meta_html cssie $j_basepath.'css/ie.css', array('media'=>'screen, projection')}
cssie7 ¶
To load a CSS stylesheet targeting Internet Explorer 7, you just need to do as follow:
{meta_html cssie7 $j_basepath.'css/ie7.css', array('media'=>'screen, projection')}
cssltie7 ¶
To load a CSS stylesheet targeting Internet Explorer < 7, you just need to do as follow:
{meta_html cssltie7 $j_basepath.'css/ielt7.css', array('media'=>'screen, projection')}
csstheme ¶
to load a CSS stylesheet which is in the themes folder, you just need to do as follow:
{meta_html csstheme 'screen.css', array('media'=>'screen, projection')}
cssthemeie ¶
to load a CSS stylesheet which is in the themes folder, targeting Internet Explorer, you just need to do as follow:
{meta_html cssthemeie 'ie.css', array('media'=>'screen, projection')}
cssthemeie7 ¶
to load a CSS stylesheet which is in the themes folder, targeting Internet Explorer 7, you just need to do as follow:
{meta_html cssthemeie7 'ie7.css', array('media'=>'screen, projection')}
cssthemeltie7 ¶
to load a CSS stylesheet which is in the themes folder, targeting Internet Explorer < 7, you just need to do as follow:
{meta_html cssthemeltie7 'ielt7.css', array('media'=>'screen, projection')}
style ¶
to add inline CSS to your page, you just need to do as follow:
{meta_html style array('body' => 'background-color: #b4d455')}
bodyattr ¶
to add additionnal attributes to the <body>
tag, you just need to do as follow:
{meta_html bodyattr array('class' => 'special')}
keywords ¶
to add words in a meta keywords tag, you just need to do as follow:
{meta_html keywords 'foo, bar, foobar, barfoo')}
description ¶
to add a description in a meta description tag, you just need to do as follow:
{meta_html description 'Cette page contient des informations sur blablahblah..')}
author ¶
to add author(s) in a meta author tag, you just need to do as follow:
{meta_html author 'Jane Doe')}
generator ¶
to indicate the generatorin a meta generator tag, you just need to do as follow:
{meta_html generator 'Jelix'}
others ¶
to add additionnal content in the header of your page, you just need to do as follow:
{meta_html others '<meta name="robots" content="index, follow" />'}
meta_htmlmodule ¶
this meta provides a shortcut to access to the own CSS, JS, and image content located in the www directory of the module.
Like above you can use any combination of meta_htmlmodule with js, css or others, example:
{meta_htmlmodule css 'mymodule', 'css/screen.css', array('media'=>'screen, projection')}
thus Jelix will go inside the directory 'mymodule'/www/css or 'mymodule'/www/themes/'currenttheme'/css to find the file screen.css