[Cartoweb-dev] [Bug 1085] Documentation for the possible Smarty variables in layers.tpl

bugzilla-daemon at bugzilla.maptools.org bugzilla-daemon at bugzilla.maptools.org
Mon Oct 10 11:16:52 EDT 2005


http://bugzilla.maptools.org/show_bug.cgi?id=1085

sylvain.pasche at camptocamp.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From sylvain.pasche at camptocamp.com  2005-10-10 11:16 -------
    <sect2 id="user.layers.metadata.template">
      <title>Using the metadata fields in templates
(<filename>layers.tpl</filename>)</title>
      <para>Metadata declared in mapfiles or <filename>layers.ini</filename>
        can be used in the <filename>layers.tpl</filename> Smarty templates 
        using the following notation:
        </para>
        <programlisting><![CDATA[
 {capture name=caption}
{$element.layerLabel} <a
href="/?lang={$element.layerMeta.lang}&client_id={$element.layerMeta.client_id}">
{element.layerMeta.complex_label}</a>
{/capture}       
        ]]></programlisting>
        <para>
        As we can see in the previous example, metadata values can be used
through the 
        <literal>layerMeta</literal> property of the <literal>$element</literal>
Smarty 
        variable. Typical usage of this feature is to render for instance several 
        HTML links for each layers.
        </para>
    </sect2>



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


Please do NOT reply to this email, use the link above instead to 
login to bugzilla and submit your comment. Any email reply to this
address will be lost.


More information about the Cartoweb-dev mailing list