Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Tabs
I have a page with two tabs (a,b) within the same page with information inside each tab. I was planning to use the body in the article area for tab a, but now I don’t have any way to insert information into tab b. The excerpt is alright used and I don’t want to use the custom tags because the content needs to be formatted.
Thank you for your help TXP community.
Last edited by code365 (2017-09-11 15:22:49)
Offline
Re: Tabs
I hope we’ll have a nice two-body solution with txp 4.8 custom fields… Meanwhile, etc_query
might help:
- split the body of the article into two top-level
div
s:
<div>
first tab content
</div>
<div>
second tab content
</div>
- replace
<txp:body />
where appropriate with
<txp:etc_query data='<txp:body />' globals="">
<section id="tab1">{div[1]}</section><!-- or any tab markup -->
<section id="tab2">{div[2]}</section>
</txp:etc_query>
Not ideal for long articles, but what can we do?
Offline
Re: Tabs
Thank you etc
Offline
Pages: 1