Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-12-06 14:28:19

FireFusion
Member
Registered: 2005-05-10
Posts: 698

Tag in tag current section not working

The following code should get my right hand menu to change based on the current section but it stays on the same section.

<!-- nav sub -->
<div id="nav_sub">
<h3><txp:section title="1" link="1" /></h3>

<ul class="nav_items">
<txp:article_custom limit="999" section='<txp:section />' sort="position asc">

<li<txp:if_article_id> class="current"</txp:if_article_id>><a href="<txp:permlink />"><txp:if_custom_field name="alternative_page_title"><txp:custom_field name="alternative_page_title" /><txp:else /><txp:title /></txp:if_custom_field></a></li>

</txp:article_custom>
</ul>
</div>	

See the example here in the right hand menu. If you move to different sections it stays the same.

Offline

#2 2008-12-06 14:29:03

FireFusion
Member
Registered: 2005-05-10
Posts: 698

Re: Tag in tag current section not working

Perhaps something to do with this code proceeding it?

<!-- main navigation -->
<div id="nav_main">
<txp:variable name="sec" value='<txp:section />' />
<txp:section_list 

sections="buddhist-center,weekly-classes,special-events,kadampa-buddhism,public-service,information"

default_title='<txp:text item="home" />' include_default="1" wraptag="ul" break="li" class="tabs" active_class="current">
<txp:section link="1" title="1" class='<txp:if_variable name="sec" value=''<txp:section />''>current</txp:if_variable>' />
	<txp:article_custom  section='<txp:section />' wraptag="ul" sort="position asc">
		<li><a href="<txp:permlink />" <txp:if_article_id>class="current"</txp:if_article_id>><txp:title /></a></li>
	</txp:article_custom>
</txp:section_list>

</div>

Offline

#3 2008-12-06 14:35:35

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: Tag in tag current section not working

Bit off topic, but the video introductions are really nicely presented. What did you use to build it?

Offline

#4 2008-12-06 14:36:40

FireFusion
Member
Registered: 2005-05-10
Posts: 698

Re: Tag in tag current section not working

Thank you :)

Premiere pro. Unless you mean the media player which is the JW FLV MEDIA PLAYER

Last edited by FireFusion (2008-12-06 14:38:00)

Offline

#5 2008-12-06 14:37:02

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: Tag in tag current section not working

Have a link?
Never mind, I found it!

Last edited by jstubbs (2008-12-06 14:38:08)

Offline

#6 2008-12-06 14:42:07

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Tag in tag current section not working

In this line:

<txp:article_custom limit="999" section='<txp:section />' sort="position asc">

try if replacing <txp:section /> with <txp:variable name="sec" /> helps.

Offline

#7 2008-12-06 14:44:12

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: Tag in tag current section not working

FireFusion,
your issue may be related to this bug


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#8 2008-12-06 14:47:34

FireFusion
Member
Registered: 2005-05-10
Posts: 698

Re: Tag in tag current section not working

Els wrote:

In this line:

<txp:article_custom limit=“999” section=’<txp:section />’ sort=“position asc”>

try if replacing <txp:section /> with <txp:variable name="sec" /> helps.

Outputs nothing now :(

Offline

#9 2008-12-06 14:49:31

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Tag in tag current section not working

Is this tag: <txp:variable name="sec" value='<txp:section />' /> before or after your article_custom tag?

Offline

#10 2008-12-06 14:55:46

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Tag in tag current section not working

maniqui wrote:

FireFusion,
your issue may be related to this bug

Ah, you’re right. In that case it won’t work without replacing taghandlers.php (see wet’s reply in that thread). If you replace it, your own code should work.

Last edited by els (2008-12-06 14:59:04)

Offline

#11 2008-12-06 15:15:36

FireFusion
Member
Registered: 2005-05-10
Posts: 698

Re: Tag in tag current section not working

Sorry Els your method did work it just i’d just missed a closing bracket.

Offline

#12 2008-12-06 15:28:53

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Tag in tag current section not working

Great :) Thanks for letting me know!

Offline

Board footer

Powered by FluxBB