Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#85 2007-12-16 14:41:26

Alex007
Member
Registered: 2007-10-24
Posts: 57

Re: [plugin] [ORPHAN] ob1_pagination

This paginates but through the ‘news’ section not all of that articles in category ‘Latest-News’

I don’t think the pagination works with <txp:article />

Offline

#86 2007-12-16 14:51:34

jstubbs
Moderator
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: [plugin] [ORPHAN] ob1_pagination

It does work with txp:article, but its just not the way you want it. Assuming you are in News section, and the articles you want to pull are in other sections, you are correct, we need article_custom:

<!-- section page: display the first two articles then paginate -->
<txp:article_custom status="live" section="heathrow-news,stem-news,health-social-care-news" category="Latest-News" form="news" limit="2" />
<div class="paginationwrap">
<txp:ob1_pagination firsttext="First" previoustext="Previous" nexttext="Next" lasttext="Last" ulclass="pagination" />
</div>

Offline

#87 2007-12-16 15:00:58

Alex007
Member
Registered: 2007-10-24
Posts: 57

Re: [plugin] [ORPHAN] ob1_pagination

Ok So i have tried this, in the news and it displays nothing – am in doing something wrong at the article level?

<!-- section page: display the first two articles then paginate -->
<txp:article_custom status="live" section="heathrow-news,stem-news,health-social-care-news,news" category="Latest-News" form="news" limit="2" />
<div class="paginationwrap">
<txp:ob1_pagination firsttext="First" previoustext="Previous" nexttext="Next" lasttext="Last" ulclass="pagination" />
</div>

Last edited by Alex007 (2007-12-16 15:06:15)

Offline

#88 2007-12-16 15:09:39

Alex007
Member
Registered: 2007-10-24
Posts: 57

Re: [plugin] [ORPHAN] ob1_pagination

This is all of the code – am i doing something wrong somewhere else, this shows all articles in “Latest-News” but no pagination – so almost ther just without the pagination!

<txp:if_individual_article> 
	<h3 id="othernews">Other News</h3>
<ul class="othernews">
<txp:article_custom  form="news_list" section="news"  limit="999" pgonly="0" status="4" time="any" />
</ul>
<txp:else />
<txp:if_article_list>
<!-- section page: display the first two articles then paginate -->
<txp:article_custom  status="live" category="Latest-News" listform="news" limit="12" />
<div class="paginationwrap">
<txp:ob1_pagination firsttext="First" previoustext="Previous" nexttext="Next" lasttext="Last" ulclass="pagination" />
</div>
</txp:if_article_list>
</txp:if_individual_article>

Offline

#89 2007-12-16 15:34:08

jstubbs
Moderator
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: [plugin] [ORPHAN] ob1_pagination

Alex007, I think article_custom does not support pagination (I don’t know, because its not clear from the TextBook entry).

OK – after some testing on one of my sites, it definitely appears article_custom does NOT support paging. I think if you really want to use this pagination plugin, you will have to change your articles and place them in the “news” section, then use categories for organisation.

Pagination is only going to pull articles from within a given section.

What you could do is use if_category conditionals to pull out all the articles within the category you want to show, and use TXP’s built in tags (like next/prev) for pagination within the categories.

Offline

#90 2007-12-16 17:08:35

Alex007
Member
Registered: 2007-10-24
Posts: 57

Re: [plugin] [ORPHAN] ob1_pagination

Thanks jstubbs for all your help with this.

This is why i think i was trying it with chh_article_custom as iblastoff suggested you can paginate through articles within a category here

I hope i can get to the bottom of this as it seems crazy u cant do this with the standard txp library.

Thanks again.
A.

Offline

#91 2007-12-16 17:13:27

jstubbs
Moderator
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: [plugin] [ORPHAN] ob1_pagination

Sorry I don’t know the chh_article_custom plugin, but I can tell you that the errors from your earlier post are due to the fact that listform is a deprecated tag.

Instead of this:

<txp:if_article_list>
<!-- section page: display the first two articles then paginate -->
<txp:article_custom  status="live" category="Latest-News" listform="news" limit="12" />
<div class="paginationwrap">
<txp:ob1_pagination firsttext="First" previoustext="Previous" nexttext="Next" lasttext="Last" ulclass="pagination" />
</div>
</txp:if_article_list>

Try this:

<txp:if_article_list>
<!-- section page: display the first two articles then paginate -->
<txp:chh_article_custom category=“Latest-News” form=“news” limit="2" />
<div class="paginationwrap">
<txp:ob1_pagination firsttext="First" previoustext="Previous" nexttext="Next" lasttext="Last" ulclass="pagination" />
</div>
</txp:if_article_list>

Offline

#92 2007-12-16 17:20:37

Alex007
Member
Registered: 2007-10-24
Posts: 57

Re: [plugin] [ORPHAN] ob1_pagination

Nope still no pagination ;(

Offline

#93 2007-12-16 17:30:32

jstubbs
Moderator
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: [plugin] [ORPHAN] ob1_pagination

I think chh_custom_ is not working properly with TXP 4.05 (assuming you have that). Have you considered re-arranging the way you organise your section articles in order to make the pagination work?

For example, place all news articles in the news section, then organise further by category. You have quite a lot of options that way.

Offline

#94 2007-12-16 17:32:58

Alex007
Member
Registered: 2007-10-24
Posts: 57

Re: [plugin] [ORPHAN] ob1_pagination

I have done but I cant see h ow it will resolve the problem, how will i show all the news articles in the other sections?

/stem-news if articles are saved under the news section for example?

Offline

#95 2007-12-16 17:39:41

jstubbs
Moderator
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: [plugin] [ORPHAN] ob1_pagination

I am reading up on article_custom myself now too, and I just noticed that as it says here there is no way to paginate with the default TXP tags txp:older and txp:newer will not work.

What will work for you is to use a tag like this in your /stem-news section:

<txp:article_custom section="news" limit="100" form="your_form" />

That will pull out all of your article from the news section.

If article_custom supported comma separated sections, it would be better…

Offline

#96 2007-12-16 17:43:10

Alex007
Member
Registered: 2007-10-24
Posts: 57

Re: [plugin] [ORPHAN] ob1_pagination

Mmmm so no solution by the looks of things.

Seems strange as you would imagine this is a perfect example for a good way of having a kind of subsection to the main section, in this example the latest news articles.

Will keep on digging further to see if anyone else has ever done anything like this, if i succeed i will keep you posted.

A.

Offline

Board footer

Powered by FluxBB