Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
show article's in category page
Hi, guys! how i can show list of articles in category page?
when i click to category link, page showing error, that i don’t have txp:article tag in this page (mysite.com/category/categoryname)
but i used in my default page tag:
<txp:if_category>
…
</>
i need to create section with name category ?
and!
how i can show articles only from one category, in which user clicked, without
<txp:if_category name /> ?
thanks!
Last edited by Katalonian (2011-01-10 13:00:23)
<txp:txp_me />
Offline
Re: show article's in category page
Katalonian wrote:
how i can show articles only from one category, in which user clicked, without
<txp:if_category name /> ?
You don’t need to do anything special at all. Just put a regular article
tag in the page template, where it will be seen. That is, if you need the if_category
block, make sure it has an article tag in it (if there isn’t one elsewhere on the page).
Code is topiary
Offline
Re: show article's in category page
but i did!! nothing happens. maybe, because i used txp:if search and txp if_individual_article in one page? and 3 <txp:else/> ?
and can i use for category pages another page\section (non-default) ?
<txp:txp_me />
Offline
Re: show article's in category page
Katalonian wrote:
but i did!! nothing happens. maybe, because i used txp:if search and txp if_individual_article in one page? and 3 <txp:else/> ?
Maybe, but there’s no way we can tell unless you show us the whole template.
and can i use for category pages another page\section (non-default) ?
Page is controlled by section. I don’t recommend making a “category” section.
Code is topiary
Offline
Offline
Re: show article's in category page
Thanks. You didn’t close either of the article
tags inside the if_category
block.
Are you in debugging mode?
Code is topiary
Offline
Re: show article's in category page
yes.
but, i cant see where i didn’t closed tag.
<txp:txp_me />
Offline
Re: show article's in category page
Lines 21 and 26. (click “Expand” to see the line numbers.)
Edit: I ask again, is the site in debugging mode?
Last edited by jsoo (2011-01-10 15:23:52)
Code is topiary
Offline
Re: show article's in category page
Dude, where you saw non closed tag here?) <txp:article form=“allnews” limit=“2” pgonly=“0” searchall=“1” sort=“Posted desc” status=“4”/>
Site in test mode, but now i changed to debug mode.
<txp:txp_me />
Offline
Re: show article's in category page
My mistake :)
Now that you have the site in debug mode, you can look at the tag trace to figure out what’s happening.
Code is topiary
Offline
Re: show article's in category page
Ошибка тега: -> Textpattern Notice: Шаблон main не содержит тег txp:article on line 543
textpattern/publish.php:543 trigger_error()
index.php:45 textpattern()
what in russian means page main- do not have tag _txp:article on line 543
<txp:txp_me />
Offline
Re: show article's in category page
Katalonian wrote:
what in russian means page main- do not have tag _txp:article on line 543
Good strong hint, that. Means your template control structure is not accounting for the URL in question. That is, there is some case amidst your if
statements you haven’t covered yet. What URL or URLs cause this message?
Code is topiary
Offline