imScript Manual


Include examples

« Back  |  Next »
Introduction
General information
Text field
Image field
Page information
Links & Menu
Include
Data tags
User data
Date tags
Velocity
API samples
JSP
imScript tags list
RSS feed
Dynamic includes
Dynamic include means, that administrator can create and control includes on page in imCMS administration system without making changes in current page template model.


Tag for a dynamic includes looks in following way: <?imcms:include?>. The tags will be automatically numbered in system from 1 and further in order they inserted in template.

In order to control tags in code it is possible to mark them by inserting attribute no=’x’ inside numbered tag. Numbered tags will have the following look: <?imcms:include no=’2’?>. 

Example:

<div"centre"><?imcms:include no='1'?></div>

Static include – imCMS document
In Static include, including action controls directly in template model and effect in every page, created on current template model .

With static include you can easily reproduce for example the page header, footer, menu and copyright texts etc, already existed in system.

Tag for static includes looks in following way: <?imcms:include document='1234'?>

Static include - file
To include a text/HTML file which doesn’t have own metaID but located in same system necessary to use file attribute with file location value:

<?imcms:include file='/includes/my_file.html'?>

Static include - external file
To include a text/HTML file which is located in other system/server necessary to use URL attribute with file location value:

<?imcms:include url='http://www.mydomain.com/my_file.html'?>

Template attributes
Normally, included page have layout based on template model it was created. To include page with layout different from template model it was created necessary to use template attribute with another template model name in value:

Example:

<?imcms:include no='1' template='another_template'?>or…
<?imcms:include document='1234' template='another_template'?>

[Help for the whole system | imScript manual | All documentation]

Suggestions or comments? Please send us a mail: info@imcode.com