Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-08-14 18:48:40

progre55
Member
Registered: 2006-05-02
Posts: 668

Navigation Assistance: article_list with article_custom

I am attempting to create a simple navigation scheme. You select a search criteria (ie sports) and are returned a list of articles. (simple enough) Because of the number of articles in a particular section, I need to limit the list.

At the bottom of the list, I want the user to be able to go to the next 10 articles (and so on and so on). I do not have the option of using article instead of article custom because of the section limitation and the sort by custom field.

<txp:if_article_list>

<txp:if_section name=“sports”>
<table id=“archive” cellspacing=“0”>
<thead>
<tr>
<th class=“sortable”>Name</th>
<th class=“sortable”>Position</th>
<th class=“sortable”>Fielding</th>
<th class=“sortable”>Batting</th>
</tr>
</thead>
<tbody>
<txp:article_custom section=“sports” sort=“custom_5” form=“listings” limit=“10” />
</tbody>
</table>
</txp:if_section>

</txp:if_article_list>

I already looked at chh_article_custom but do not think that will solve my problem.

Any and all assistance would be appreciated.

progre55

Last edited by progre55 (2007-08-14 18:50:12)

Offline

#2 2007-08-14 19:31:04

andreas
Member
Registered: 2004-02-28
Posts: 453
Website

Re: Navigation Assistance: article_list with article_custom

I’m not sure I understand you correctly, but article_custom has an attribute called offset that might do what you want. Documentation is here

Last edited by andreas (2007-08-14 19:31:53)

Offline

#3 2007-08-14 19:41:55

progre55
Member
Registered: 2006-05-02
Posts: 668

Re: Navigation Assistance: article_list with article_custom

andreas

Thanks for the reply. The attribute offset is used for something different.

What I need to do is show 10 articles in an article list with simple navigation on the bottom that allows me to go to the next 10 (and so on). The trick is that I need to use article_custom in the list ….

progre55

Last edited by progre55 (2007-08-14 19:42:41)

Offline

#4 2007-08-14 19:50:45

andreas
Member
Registered: 2004-02-28
Posts: 453
Website

Re: Navigation Assistance: article_list with article_custom

So you want to page forward and back? And I suppose the paging tags only work for the normal article tag, right?

Offline

#5 2007-08-14 21:02:37

progre55
Member
Registered: 2006-05-02
Posts: 668

Re: Navigation Assistance: article_list with article_custom

andreas:

yes, but I have to believe somewhere out ther has an answer …

progre55

Offline

#6 2007-08-14 21:39:30

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Navigation Assistance: article_list with article_custom

progre55

Looking at your code I don’t understand why you need article_custom. Inside the conditional <txp:if_section name="sports"> you are only calling articles from that section. Why can’t you use txp:article? As far as I know you can use sort="custom_5" in an article tag as well.

Offline

Board footer

Powered by FluxBB