Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
if not "this" sections
There is some plugin wich opposite to <txp:if_section/>?
im need something like to show content if user are in page of another section.
i know about <txp:else/>, i dont need it, because i have much more <txp:if_section/> in one place, and else dont help me in this situation.
wait for responce. thanks!
<txp:txp_me />
Offline
#2 2010-10-03 12:54:56
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: if not "this" sections
Katalonian wrote:
i know about <txp:else/>, i dont need it, because i have much more <txp:if_section/> in one place, and else dont help me in this situation.
Yes you need <txp:else />
:) If you can explain what exactly “this situation” is, I’m quite confident we can find a way to do it without plugin.
Offline
Re: if not "this" sections
:)
This is code. http://shortText.com/uox5ssjj39
It’s a accordion menu. I want to do that if some one in one section of this menu, this section be first in list.
But if user on main page or in some other page, menu will be sorted how after <else>.
<txp:txp_me />
Offline
Re: if not "this" sections
Switching the order of a menu sounds like very poor usability. I know that’s not what you’re asking, but … are you sure you want to do this?
Code is topiary
Offline
Re: if not "this" sections
I know jsoo…
But client, he decided and he want it.
<txp:txp_me />
Offline
Re: if not "this" sections
If I understand correctly, if you’re on the homepage you want:
- home
- section1
- section2
But if you’re in another section (section2 as an example here), it should look like this:
- section2
- home
- section1
What’s not working in the code you currently have?
Offline
Re: if not "this" sections
right!.
I have much more sections in menu list + other section, which in not list, and i want to view in other section which not in menu, like on home page(standart for all,which not in menu list.)
<txp:txp_me />
Offline
Re: if not "this" sections
Something like this perhaps (not tested and you’ll have to replace the section names.)
/* first section */
<txp:if_section name="section1,section2">
<span class="basic_a"><txp:section title="1" /></span>
<txp:article_custom category='<txp:section />' form="list" sort="position asc" />
</txp:if_section>
/* remaining sections */
<txp:section_list sections="section1,section2" include_default="1" break="">
<txp:if_section name='<txp:section />'>
/* don't show here, section already shown at the top of the list */
<txp:else />
<span class="basic_a"><txp:section title="1" /></span>
<txp:article_custom category='<txp:section />' form="list" sort="position asc" />
</txp:if_section>
</txp:section_list>
Offline
Pages: 1