Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-10-21 21:16:56

Bongo-man
Member
Registered: 2009-03-18
Posts: 243

If category for index pages + article titles listed by date in it ;-)

I’m sorry I have another little, seemingly incomprehensible problem: I hope someone could tell me something that allow me to get the solution.

My problem is double and the probable major problem perhaps is in the ‘txp:if_article_category’.

Now I begin from the second part of my question (the less problematic):

- To list articles by data I think I will try with the ‘month’ attribute of ‘chh_article_custom’ plugin, altough I also succed in listing article titles with the ‘month’ attribute of ‘txp:article_custom’.

—> But my true problem is that I cannot get ‘if_article_category’ work the just way listing the articles by date; I don’t know why occurs this:

What I need is to list all the titles of monthly articles, in monthly index articles-pages whose first category matches the corresponding month and I wrote this code (but it does not work):

<txp:if_article_section name="montlyarchives">

           <txp:if_article_category name="2009august">

           <txp:article_custom month="2009-08-22" label="August 2009 articles:"  sort="Posted asc" break="br">
           <txp:permlink><txp:title /></txp:permlink>
           </txp:article_custom>

           </txp:if_article_category>

           <txp:if_article_category name="2009july">

           <txp:article_custom month="2009-07-23" label="July 2009 articles:" sort="Posted asc" break="br">
           <txp:permlink><txp:title /></txp:permlink>
           </txp:article_custom>

           </txp:if_article_category>

           </txp:if_article_section>

....and so on with ther similar expressions...

Besides as you can see all these index articles is placed in a specific section (montlyarchives) whose template is the same for all.

Hope someone could help me.
Thank you in advance,
Bongo

(How do I post tags and code on the forum? -Els)

Last edited by els (2009-10-21 23:07:40)

Offline

#2 2009-10-21 22:41:57

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,306

Re: If category for index pages + article titles listed by date in it ;-)

Bongo-man, could this be what you’re trying to achieve?

Didn’t understand that minor problem, is it gone if the major problem is solved?


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#3 2009-10-21 23:20:27

Bongo-man
Member
Registered: 2009-03-18
Posts: 243

Re: If category for index pages + article titles listed by date in it ;-)

Seemingly, yes, it is what I need, I will try this night to check and prove it.

… never to be enthusiast to soon: this is frequently my problem!

Seemingly what you told me can solve the only part of my problem I did not need to solve.
I’ve checked and tried and re-tried, but I need to have monthly articles in different pages, one for every month:
So I need to set an if category, but I don’t know why it did not work.

Can anyone know a solution for this problem?

Last edited by Bongo-man (2009-10-22 02:17:43)

Offline

#4 2009-10-21 23:43:04

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,306

Re: If category for index pages + article titles listed by date in it ;-)

Bongo-man wrote:

…but, it’s incredible where it was?

Probably a question of terminology, I had myself some difficulties with the term “archive”.
Google’s probably not the perfect tool for such a search, at least as long as you can’t effectively confine it. The Forum, the FAQs, Textbook, and not least TXPTips (all to be found in the TXP Network Links top right) are good starting points for finding coded examples.

BTW, please read the FAQ page I linked to all the way down to where it says:

To display only articles from a specific section or category, change the article_custom tag.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#5 2009-10-22 06:21:13

Bongo-man
Member
Registered: 2009-03-18
Posts: 243

Re: If category for index pages + article titles listed by date in it ;-)

I’m sorry I modified my post last night and you were probably answering me to the antecedent message, in which I was surprised not having found such FAQ on Google.

… but I have modified my messsage because I haven’t fund the solution on the basis of what you answered me.

Now the night is over and I have found the solution for the error preventing the expression above to work:

I’ve fund that <txp:if_article_category> need t works that I specify, not only the ‘name’ attribute of ‘txp_if_category’ but the number of the category too.

Last edited by Bongo-man (2009-10-22 10:54:30)

Offline

Board footer

Powered by FluxBB