AlunR
The website, blog and general musings of Alun Rowe
Textpattern and Sliding Doors technique
Last week whilst designing a site based on the excellent Textpattern CMS we came across the need to use the Sliding Doors technique .
Using the standard…
<txp:section_list wraptag="ul" break="li" />
unfortunately doesn’t allow for you to add an ID the <li> element.
So a little bit of searching later and I came across the <txp:if_section> tag and was able to construct a simple list.
<div id="tabmenu">
<ul>
<li><txp:if_section name="default"> id="current"</txp:if_section><a href="<txp:site_url />Home</a></li>
</ul>
</div>
Whilst it’s not built by the section_list tag which is a bit irritating (and it means you’ll have to manually update it) it does allow for you to use the Sliding Doors technique and TXP together without pages of repeated code.
hiya alun,
When i do things like this i take it out of the page into a form, this means that you do not have to be constantly updating it.
I am a bit confused though, i cannot seem to be able to see the <li> could you explain how you are hiding it?
Jamie Knight
— Jamie Knight · Feb 9, 02:42 pm · #
Hi Jamie,
Whoops! I’ve added the <li> now…
Yes you are right I SHOULD have said, stick this in a form.
— Alun Rowe · Feb 10, 08:57 am · #
hiya,
Ahh, make perfect sense now. Nice tip.
<txp:if_section>
is also very useful for containing search results.
licks
Jamie & Lion
— Jamie Knight · Feb 10, 04:29 pm · #