Frequently Asked Questions
How do I change the appearance of..
Q.
How do I change the appearance of a particular tag?
How do I change the markup used by a particular tag?
A.
Most tags that display content with markup support some (though not necessarily all) of the following attributes:
- wraptag – a tag that wraps around content; typically
ulby default - class – CSS class applied to the wraptag; typically uses the tag name by default
- break – a tag used to wrap or separate each item in a list (of articles, links, etc); typically
liby default - breakclass – CSS class applied to each break tag
It’s not necessary to include < and > in these attributes. If you use the tag names only, Textpattern will handle common self-closing tags correctly. For example:
<txp:section_list wraptag="div" break="br" />
produces something like this, with <br /> tags following each item:
<div class="section_list">
<a href="/section1/">section1</a><br />
<a href="/section2/">section2</a><br />
</div>
While this:
<txp:section_list wraptag="ol" break="li" />
produces <li> tags that surround each item:
<ol class="section_list">
<li><a href="/section1/">section1</a></li>
<li><a href="/section2/">section2</a></li>
</ol>
A detailed list of tags and their supported attributes can be found in the TextBook Alphabetical Tag Listing. The Attribute Cross Reference lists the tags that support each attribute.
Posted 17 October 2005, 02:52 by Alex Shiels
