Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2008-09-25 20:58:47
- FireFusion
- Member
- Registered: 2005-05-10
- Posts: 698
if Different on Category 2
Here is what I get…
- Example County
- Example Branch
- Middle County
- Class 1
- Class 2
- Class 3
- Example County
- Class 4
Here is what I expected/wanted to happen…
- Example County
- Example Branch
- Class 4
- Middle County
- Class 1
- Class 2
- Class 3
Here is the code i’m using…
<txp:article_custom allowoverride="0" category="Class-Locations" form="branch_classes" sort="(custom_2+0) desc" limit="999" />
<txp:if_first_article>
<h4>Weekly Drop-in Classes</h4>
<ul id="branches">
</txp:if_first_article>
<txp:if_different><txp:category2 class="county" title="1" wraptag="li" /></txp:if_different>
<li><a href="<txp:permlink />"><txp:title /></a></li>
<txp:if_last_article>
</ul>
</txp:if_last_article>
Last edited by FireFusion (2008-09-25 20:59:49)
Offline
#2 2008-09-25 22:25:28
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: if Different on Category 2
If you’re using if_different on Category2 you need to sort on Category2 as well…
Edit: but I think you can do this: sort="Category2 asc, (custom_2+0) desc"
.
And I’m curious what (custom_2+0)
does :)
Last edited by els (2008-09-25 22:27:52)
Offline
Re: if Different on Category 2
And I’m curious what (custom_2+0) does :)
It’s easy – it sorts right: 1,2,3,4..9,10,11
but not 1,10,2,20,3
if just write custom_2
Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?
Offline
#4 2008-09-26 11:06:39
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: if Different on Category 2
Ah I see :) And if the numbers are higher than 99, would you have to use (custom_2+00)
or is just the one zero sufficient regardless how high the numbers are?
Offline
Pages: 1