Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#13 2006-07-12 02:14:04
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: how do I display a certain number of search results?
It means you’ve got no articles in that section that have that category.
Offline
#14 2006-07-12 02:20:51
- progre55
- Member
- Registered: 2006-05-02
- Posts: 668
Re: how do I display a certain number of search results?
Mary:
How can that be …
If I keep my original code, then I get the search results (which are the articles with that category) …
If you mean that the articles need to have the category and also be linked to that section only, then I understand … since the article themselves are tied to another section so that I can show detail …
Last edited by progre55 (2006-07-12 02:21:34)
Offline
#15 2006-07-13 00:06:00
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: how do I display a certain number of search results?
If you mean that the articles need to have the category and also be linked to that section only, then I understand … since the article themselves are tied to another section so that I can show detail …
Yes, that’s what I mean. article_custom would grab from all sections, but, it wouldn’t show you the next/prev navigation. article would show the next/prev navigation, but would onlty show articles from that section.
Is there a reason why you don’t want to use the default category listing?
Offline
#16 2006-07-13 02:23:10
- progre55
- Member
- Registered: 2006-05-02
- Posts: 668
Re: how do I display a certain number of search results?
Mary:
Correct me if I am wrong, but I do not think the category list would accomplish my goal.
The category list only returns a list of the catgerories … I need a list of the categories that will be directed to a specific section – not the default page – and then once on that section that is where I need to be able to limit the number on that list with a previous and next button ….
Offline
#17 2006-07-13 02:32:19
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: how do I display a certain number of search results?
This is even more confusing…
The default category listing returns a list of articles matching the requested category. If you direct the category listing to a section, then it will only return articles from that section that match the requested category.
Offline
#18 2006-07-13 12:29:15
- progre55
- Member
- Registered: 2006-05-02
- Posts: 668
Re: how do I display a certain number of search results?
Mary:
When you say default category listing aren’‘t you referring to this tag:
<ode>txp:category_list /></code>
If that is correct, when I place this code into my page I get a list of the article categories. If I then click on the category, it directs me back to the default page.
ALso, the category_list (if this is the tag you are reffering to) display all the article categories, where I just want to display a subset and this is why have gone down the other path … which I got from this discussion with Els: How Do I… & Other Questions » Category List – Pull Down
Again sorry for the hassle, and maybe there just is not a way to do a previous and next using this method … I hope there is, but maybe not …
Offline
#19 2006-07-14 00:05:29
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: how do I display a certain number of search results?
When you say default category listing aren’t you referring to this tag:
No. I mean the default category listing:
http://yourdomain.com/c?=your-category (messy urls) or
http://yourdomain.com/category/your-category (clean urls)
If I then click on the category, it directs me back to the default page.
That’s what it’s supposed to do. It uses the article tag on that page if there is one. Put this on your default page:
<txp:if_category>
<txp:article sortby="Posted" limit="5" />
<p><txp:older>Prev</txp:older> · <txp:newer>Next</txp:newer></p>
</txp:if_category>
and use one of the built-in category urls (as above).
Offline