Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2013-04-24 17:36:47

Karsten
Member
From: Leiden, Netherlands
Registered: 2011-04-24
Posts: 47
Website

Re: Category list broken after update

clever…. I’ll play around with that and see if I can get it to work.

Thanks

Offline

#14 2013-04-25 08:51:33

Karsten
Member
From: Leiden, Netherlands
Registered: 2011-04-24
Posts: 47
Website

Re: Category list broken after update

Aaarg…. I cannot get it to work…. the plan suggested by Jukka works, sort of….

At the moment the code does not make any of the children appear, it just calls in the articles labeled with the parent categoy (animals) but the dogs and cats are still missing.

Subsequently, as I now have a article_custom, I can’t get the pagination to work…

I tried etc_pagination but this seems to be too complex for me… in the end it sort of worked creating a next and previous button, but each revealed exactly the same articles over and over again.

Any thought on how to tackle this problem?

Offline

#15 2013-04-25 09:26:48

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,547
Website GitHub Twitter

Re: Category list broken after update

Hi

I tried this link http://www.sidestone.com/library/?c=animals but get 404 error!
can you post all the page code then we can see were the problem occur? the code given by jukka should work!

Offline

#16 2013-04-25 10:01:34

Karsten
Member
From: Leiden, Netherlands
Registered: 2011-04-24
Posts: 47
Website

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

#17 2013-04-25 10:06:49

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,547
Website GitHub Twitter

Re: Category list broken after update

Hi

but where is a link that not works like expected? wich category has subcategories?

Offline

#18 2013-04-25 10:14:59

Karsten
Member
From: Leiden, Netherlands
Registered: 2011-04-24
Posts: 47
Website

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

#19 2013-04-25 10:57:33

Karsten
Member
From: Leiden, Netherlands
Registered: 2011-04-24
Posts: 47
Website

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

#20 2013-04-25 11:00:18

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: Category list broken after update

The code you posted has some errors in it:

  • article_custom has no attributes such as listform, pgonly and searchall, and status is set to the default, making it redundant.
  • pageby is set to 2 while limit is set to 4. Both need to have the same values.
  • time is set to any while pagination is counted based on the default, past, and the etc_numpages doesn’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

Board footer

Powered by FluxBB