Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
category links are not working. what am i doing wrong?
on my homepage i have articles from several different sections. one section is called “Live Feed” which lists the five most recent articles from that section, and what category they are in. however, the category link does not take me to that section. it only loads the page “index.php?c=CategoryName”.
how do i get it to load “index.php?s=Live-Feed” AND the correct category??
thanks!!!
Offline
#2 2006-09-19 20:20:47
- whatbrick
- Member

- From: Texas
- Registered: 2006-03-13
- Posts: 100
Re: category links are not working. what am i doing wrong?
The url form you want is index.php?s=SectionName&c=CategoryName. I use something like this: <a href="<txp:site_url /><txp:section />/?c=<txp:category1 />"><txp:category1 title="1" /></a> to list the category for the article.
If you aren’t using clean-urls, you may need to alter it to look like this: <a href="<txp:site_url />?s=<txp:section />&c=<txp:category1 />"><txp:category1 title="1" /></a>.
Do not taunt the Markup Monkey!
Offline
Re: category links are not working. what am i doing wrong?
awesome. thanks!
Offline
Re: category links are not working. what am i doing wrong?
ok now that i am using the “index.php?s=Section-Name&c=Category-Name” format, it takes me to the proper section but it is not displaying the proper category (it still displays all of them).
also, i have a category list that looks like this <code><txp:category_list wraptag=“p” break=“br” section=“Section-Name” /></code> but it is outputting links in this format, “index.php?c=Category-Name”, which means it is not loading the right section page.
Offline
#5 2006-09-21 03:01:32
- whatbrick
- Member

- From: Texas
- Registered: 2006-03-13
- Posts: 100
Re: category links are not working. what am i doing wrong?
alittle116 wrote:
ok now that i am using the “index.php?s=Section-Name&c=Category-Name” format, it takes me to the proper section but it is not displaying the proper category (it still displays all of them).
Hmm, it may help if you post the entire form so people (ones smarter than I) can see what you are trying to accomplish. The snippet above works for me, but there maybe something different in your setup causing it to be flakey. Sometimes TXP’s versatility can bite you.
also, i have a category list that looks like this <code><txp:category_list wraptag=“p” break=“br” section=“Section-Name” /></code> but it is outputting links in this format, “index.php?c=Category-Name”, which means it is not loading the right section page.
Which version of TXP are you using? According to <A href=“http://textpattern.net/”>Textbook</a>, the section attribute isn’t accepted in category_list prior to v4.0.4. Categories don’t have a relation to sections as far as I know (at least in the current release of TXP).
Do not taunt the Markup Monkey!
Offline
Re: category links are not working. what am i doing wrong?
i have several sections, but i only use article categories in one of the sections. so, when i am view that sections page, i want to have a list of categories. the problem is, when i click a category, it is loading the default page. i want to be able to stay within that categories page.
i am using 4.0.3 is it possible to upgrade to 4.0.4?
Last edited by alittle116 (2006-09-22 20:23:54)
Offline
#7 2006-09-22 21:02:12
- els
- Moderator

- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: category links are not working. what am i doing wrong?
You can show category lists on their own section page, see here.
Offline