• News
  • Developer information
  • Projects & contributions
  • Forum
  • Issue tracker
  • Open Funding
  • Security
  • User groups
  • Support
  • Store
  • Company

  • Path

    ez.no / exponential / documentation / development / libraries / ez template / functions / include


    Include

    These documentation pages are no longer maintained. Please visit the new documentation site.

    It's possible to include other template files into a template file using the include function. This makes it possible to share template code among different pages or create GUI components by passing variables to the included template.

    The include function has two special input parameters. The uri parameter specifies the file to be included, the file does not have to reside as a file but can be put in a database or created dynamically. By default the template engine only loads files by their relative path to the index script, but it's possible to create custom resources as they are called. The name parameter specifies the namespace for the included template, this is useful for avoiding variable name clashes with included files. All other parameters are passed to the included template as template variables in the new namespace.

    {* Including a header *}
    
    {include uri='lib/eztemplate/sdk/templates/include_head.tpl' name='head'}
    
     
    
    {* Including the body *}
    
    {include uri='lib/eztemplate/sdk/templates/include_body.tpl' name='body' item='Body text'}
    
     
    
    {* Include a button *}
    
    {include uri='lib/eztemplate/sdk/templates/include_button.tpl' name='button' item=$button_title}

    Comments

    Contents

    Development

    Extensions
    Exponential datamodel
    Exponential tuning and stability
    Importing attribute data
    Kernel
    Libraries
        eZ xml
        eZ db
        eZ i18n
        eZ soap
        eZ template
           Basics
           Functions
              Function list
              Section
              Sequence
              Delimiter
              Switch
              Include
           Operators
        eZ webdav
    Scripting
    Standards
    System overview
    Test Suite
    Using Doxygen to create API documenta...


    Created

    07/07/2003
    3:11:06 pm
    by Bård Farstad

    Last updated

    07/07/2003
    3:11:25 pm
    by Bård Farstad

    Authors

    Bård Farstad



    This page is part of the Exponential documentation. The documentation is available under the GNU Free Documentation License. All contributions will be released under the terms of this license.