Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: Category list broken after update
Haha, the animals were an example, we don’t actually make books about dogs or cats :)
try:
http://www.sidestone.com/library/
the code I used was:
<txp:if_category>
<txp:article_custom section="library" category='<txp:category_list parent=''<txp:category />'' break=","><txp:category /></txp:category_list>' listform="Sidestone_list_library" pgonly="0" searchall="0" sort="Posted desc" time="any" status="4" limit="4" />
<txp:variable name="numPages"><txp:etc_numpages pageby="2" /></txp:variable>
<txp:etc_pagination range="1" pages='<txp:variable name="numPages" />' pgcounter="page"
link="Page {*}" first="First" prev="Previous" next="Next" last="Last" />
<txp:else />
of course followed by the article code for the normal txp:article and ending with </txp:if_category>
Last edited by Karsten (2013-04-25 10:05:57)
Offline
Re: Category list broken after update
Hi
but where is a link that not works like expected? wich category has subcategories?
Offline
Re: Category list broken after update
Most categories have subcategories, these books currently just don’t show up. As it is a live website, I don’t implement code that doesn’t work… so I don’t have a live-example… visitors should be able to use the site.
Offline
Re: Category list broken after update
I’m afraid that for the time being, I’m giving up my attempts, I’m getting rid of all subcategories and will switch them to the main categories instead. Thanks to all for you help.
Offline
Re: Category list broken after update
The code you posted has some errors in it:
- article_custom has no attributes such as
listform,pgonlyandsearchall, andstatusis set to the default, making it redundant. pagebyis set to2while limit is set to4. Both need to have the same values.timeis set toanywhile pagination is counted based on the default,past, and theetc_numpagesdoesn’t have the section neither categories set.
Basically, both tags, article_custom and etc_numpages need the exact same attributes, otherwise the number of pages won’t be calculated correctly.
Last edited by Gocom (2013-04-25 11:01:29)
Offline