Docs > Templating > Creating reusable components

You can turn snippets of XHTML markup into reusable components that can be added to any template.
It's often useful to be able to use the same bit of XHTML code on more than one template, for example to create page headers and footers, or navigation components.

You can do this by creating your own component types.

Under the Backend Code tab you will find an option named "Components". Here you can create new components. Like templates, they are coded in XHTML. They can also use the kit tags to query the site content etc.

For example, suppose you created a component named "header" that looked like this:
<a href="index.html">
<img src="images/logo.gif" alt="Logo"/>
</a>
<h1>My site!</h1>
Then you could include it in a template like this:
<html>
<head>...</head>
<body>
<xyz:header/>
...
</body>
</html>
where xyz is the name of the account. The account name is used as a namespace for these custom components.

Note that as of the current release, components cannot themselves include content placeholder tags.

Can't find what you're looking for?

Let us know and we'll see if we can help.