<?xml version="1.0"?>
<record><wiki id="wiki?page_id=24">
	<page_name>templates:tags:use_macro</page_name>
	<page_id>24</page_id>
	<page_title>templates:tags:use_macro</page_title>
	<content>==use_macro Template Tag==

===Synopsis===

The use_macro tag includes another template into the current template with the option to override certain sections.

===Parameters===

{| class=&quot;listing listing2&quot;
|-
! Name
! Description
! Version
|-
| file
| The path the template to include (within the templates directory).
| 0.6
|}

===Example===

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.

====user-profile.html====

&lt;code&gt;
&lt;html&gt;
&lt;head&gt;
    &lt;title&gt;User profile&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
   &lt;h1&gt;User bio&lt;/h1&gt;
   &lt;div id=&quot;bio&quot;&gt;
   {define_slot name=&quot;bio&quot;}
        This text will be overridden by other templates to place the correct
        bio information.
   {/define_slot}
&lt;/body&gt;
&lt;/html&gt;
&lt;/code&gt;

====steve-profile.html====

&lt;code&gt;
{use_macro file=&quot;user-profile.html&quot;}
    {fill_slot name=&quot;bio&quot;}
        This is Steve&apos;s bio.  It will override the text in the bio slot.
    {/fill_slot}
{/use_macro}
&lt;/code&gt;

===See also:===

* [[xataface templates|Xataface templates]]
* [[templates:tags:define_slot|The define_slot tag]]
* [[templates:tags:fill_slot|The fill_slot tag]]
* [http://www.xataface.com/documentation/tutorial/getting_started/changing-look-and-feel Changing the Look &amp; Feel of Xataface] (From the Getting Started Tutorial)
* [http://www.xataface.com/documentation/tutorial/customizing-the-dataface-look-and-feel Cusomizing the Xataface Look &amp; Feel] Tutorial
</content>
	<keywords></keywords>
	<language>en</language>
	<original_page>0</original_page>
</wiki></record>