Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2005-12-06 20:23:14

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Re: Opening a tag with txp:if_different, how to close it ?

doggiez wrote:
Couldn’t you use <txp:if_first_article> and <txp:if_last_article> for the opening and closing ul tags?

After some thinking, no I don’t think so. Textbook says they are article form tags, so they will be active only once on each txp:article call. The if_different strcture do not create several loops I think.

Offline

#14 2005-12-09 17:06:21

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

Re: Opening a tag with txp:if_different, how to close it ?

You’re right. I’ve been trying for three days now and I give up… If only the if_different tag could have an attribute offset…

Offline

#15 2005-12-09 17:17:26

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Opening a tag with txp:if_different, how to close it ?

So, does this or something like it, not work then? i.e:

<txp:if_different>
<li><txp:category1 title=1 />

	<ul>
</txp:if_different>

		<li><txp:permlink><txp:title /></txp:permlink></li>

<txp:if_different>
	<!-- //end <txp:category1 /> -->
	</ul>
</li>
</txp:if_different>

?

Offline

#16 2005-12-09 17:52:02

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Opening a tag with txp:if_different, how to close it ?

I’m still trying to run that one through my mind but if it works I reckon you are just too damned clever for this forum Mary. You should have one of your own. Either that or you have too much time on your hands. Take your pick and let me know the answer. :grin:


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#17 2005-12-09 19:43:13

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

Re: Opening a tag with txp:if_different, how to close it ?

> mary wrote:

> So, does this or something like it, not work then?

The output is (I wrapped the article tag in ul tags) (dashes are spaces that won’t show in code):
<code>
<ul>
—<li>CategoryOne
——<ul>
———<li>Title</li>
<!— //end categoryone —>
——</ul>
—</li>
—<li>Title</li>
—<li>Title</li>
—<li>CategoryTwo
——<ul>
———<li>Title</li>
<!— //end categorytwo —>
——</ul>
—</li>
—<li>Title</li>
—<li>Title</li>
—<li>CategoryThree
——<ul>
———<li>Title</li>
<!— //end categorythree —>
——</ul>
—</li>
—<li>Title</li>
—<li>Title</li>
</ul>
</code>
But I’ll have a closer look at it later. At least it’s closing the tags…

Last edited by doggiez (2005-12-09 19:44:52)

Offline

#18 2006-01-12 18:15:08

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: Opening a tag with txp:if_different, how to close it ?

Been trying to apply this to a nested list using Year/Month/Post title. But I’m having problems getting the ULs and LIs closed in the right places.

Anyone?

Offline

#19 2006-01-12 18:23:54

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

Re: Opening a tag with txp:if_different, how to close it ?

Well, it’s a nice puzzle for someone who is feeling bored ;) I’ve been trying for days at the time and I haven’t been able to find a way to do it properly.

Offline

#20 2006-01-12 18:27:25

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: Opening a tag with txp:if_different, how to close it ?

I don’t think it’s possible at present according to this post

Let me know what you find out…

Last edited by mrdale (2006-01-12 18:28:37)

Offline

#21 2006-01-12 18:38:56

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

Re: Opening a tag with txp:if_different, how to close it ?

Ah, I missed that one. But it seems pretty clear, it’s just not possible. I’ve certainly given up on it.

Offline

Board footer

Powered by FluxBB