Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
More than on if_different - is it possible?
I want to use 2 if_different
conditions in one form:
<txp:if_different>
</ul><h3><txp:section title="1" link="1" /></h3><ul>
</txp:if_different>
<txp:if_section name="generator">
<txp:if_different>
<li><txp:rss_uc_filedunder parent="manufacture" linktosection="category" /></li>
</txp:if_different>
<txp:else />
<li><txp:permlink><txp:title /></txp:permlink></li>
</txp:if_section>
The aim – is to build 2-level list:
- section Article
-- article 1
-- article 2
-- article 3
- section Another
-- another 1
-- another 2
-- another 3
- section Generator
-- link to manufactures category 1
-- link to manufactures category 2
-- link to manufactures category 3
But as I see two if_differents don’t like to live together :) The whole result page consists of error messages
Last edited by the_ghost (2008-04-22 20:44:16)
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
#2 2008-04-22 22:01:41
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: More than on if_different - is it possible?
You can use more than one if_different, but you need to sort on multiple fields, and in the right order. So when for instance your first if_different would contain ‘section’ and the second ‘category1’, then you would need sort="section asc, category1 asc"
in your article tag. I notice you’re using the unlimited categories plugin, I don’t know it but I assume it adds columns to the textpattern table so you’d have to find out the right column’s name to use it in the sort attribute.
Last edited by els (2008-04-22 22:03:10)
Offline
Re: More than on if_different - is it possible?
Yes, i’d like to sort through selected child category of article, but rss_unlim_cats uses separate table, not textpattern
but textpattern_category
where it stores assigned categories.
Som you advice to call this form with multiply sorting – than it should work?
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-04-23 17:17:00
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: More than on if_different - is it possible?
the_ghost wrote:
rss_unlim_cats uses separate table, not
textpattern
buttextpattern_category
where it stores assigned categories.
But where in the textpattern table is stored which categories are assigned to an article?
I’m not sure if this is at all possible. tru_tags for example (I suppose it is similar) uses the keywords field. But it wouldn’t be possible to sort on distinct keywords if there are more than one in that field.
What exactly is the output of <txp:rss_uc_filedunder parent="manufacture" linktosection="category" />
?
Offline