Twitter Feed

Xataface Maillist

Sign up to receive the Xataface news letter with weekly updates and development tips.

Found 1 of 138 records in table Wiki
Now Showing 1 of 1

Current Record: templates:tags:use_macro



use_macro Template Tag


The use_macro tag includes another template into the current template with the option to override certain sections.


Name Description Version
file The path the template to include (within the templates directory). 0.6


In this example we will create a template for a user profile, but this template will include a slot that can be overridden by other templates to customize the user bio.


    <title>User profile</title>
   <h1>User bio</h1>
   <div id="bio">
   {define_slot name="bio"}
        This text will be overridden by other templates to place the correct
        bio information.


{use_macro file="user-profile.html"}
    {fill_slot name="bio"}
        This is Steve's bio.  It will override the text in the bio slot.

See also:

blog comments powered by Disqus
Powered by Xataface
(c) 2005-2018 All rights reserved