Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#73 2007-12-15 14:53:07

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

Re: [plugin] [ORPHAN] ob1_pagination

OK I updated it to this and still no pagination ;(

<txp:if_article_list>
<txp:chh_article_custom category="Latest-News" limit="4" listform="news" sort="posted desc" />
<div class="paginationwrap">
<txp:ob1_pagination firsttext="First" previoustext="Previous" nexttext="Next" lasttext="Last" ulclass="pagination" />
</div>
</txp:if_article_list>

Last edited by ruud (2007-12-16 12:45:20)

Offline

#74 2007-12-15 14:54:19

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

Re: [plugin] [ORPHAN] ob1_pagination

ah do i need this

<txp:chh_article_custom category="Latest-News" limit="4" listform="news" sort="posted desc" />
<txp:if_article_list>
<txp:article />
<div class="paginationwrap">
<txp:ob1_pagination firsttext="First" previoustext="Previous" nexttext="Next" lasttext="Last" ulclass="pagination" />
</div>
</txp:if_article_list>

Last edited by ruud (2007-12-16 12:45:04)

Offline

#75 2007-12-15 14:59:18

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

Re: [plugin] [ORPHAN] ob1_pagination

Is it possible to pass some middle page links? For example, we have 20 pages. And plugin should provide 1 2 3 ... 18 19 20. I think some optional parametr like skipoffset=3 for example, or we can even make skipoffsetleft=5 and skipoffsetright=2 will return 1 2 3 4 5 ... 19 20


Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?

Offline

#76 2007-12-15 15:48:05

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

Re: [plugin] [ORPHAN] ob1_pagination

Alex007 wrote:

<txp:chh_article_custom category="Latest-News" limit="4" listform="news" sort="posted desc" />
<txp:if_article_list>
<txp:article />
<div class="paginationwrap">
<txp:ob1_pagination firsttext="First" previoustext="Previous" nexttext="Next" lasttext="Last" ulclass="pagination" />
</div>
</txp:if_article_list>

If you take out the chh_article_custom tag, and just use the txp article tag, what do you get? Assuming you are in a section that has articles in it, your pagination will work fine.

For example, if you have 10 articles in a section, if you change the article tag to article limit=“5”, you should get a second page in your pagination list.

Last edited by ruud (2007-12-16 12:44:47)

Offline

#77 2007-12-15 16:14:43

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

Re: [plugin] [ORPHAN] ob1_pagination

Yes if i only want to show articles in a section this works but when i want to show them in a category it wont. thats why i am stying to use the chh_article_custom

Offline

#78 2007-12-15 17:05:46

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

Re: [plugin] [ORPHAN] ob1_pagination

The TXP article_custom tag should give you all you need. I don’t think you even need chh_article_custom anymore, but I could be wrong as I don’t know this particular plugin.

I have the following in one older site, which might be helpful for you, in case you are looking to paginate within categories. Its well commented to explain what it does.

<txp:if_individual_article>
<!-- article page: display the individual article -->
<txp:article form="article" limit=1 />
</txp:if_individual_article>

<txp:if_article_list>

<txp:if_category>
<!-- category page: display the sticky article first -->
<txp:article status="sticky" form="article_sticky" limit=1 />
<!-- then the rest of the category articles -->
<txp:article listform="list_articles" form="article" limit="10" />
<txp:ob1_googlenav linkcurrent="1" ulid="googlenav" liselected="current" firsttext="First" previoustext="&laquo; Previous" nexttext="Next &raquo;" lasttext="Last" />
<txp:else />
<!-- section page: display the sticky article -->
<txp:article status="sticky" form="article_sticky" limit=1 />
<!-- then the rest of the articles -->
<txp:article listform="list_articles" form="article" limit="10" />
</txp:if_category>

</txp:if_article_list>

Offline

#79 2007-12-16 11:51:01

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

Re: [plugin] [ORPHAN] ob1_pagination

Thanks for this – I have tried it with the following but it still doesn’t seem to show the pagination, I can see you are using the

  • ob1_googlenav
I dont have this plugin installed – i have ob1_pagination v2.5 but tried it with both taggs…
<txp:if_individual_article>
<!-- article page: display the individual article -->
<txp:article form="news" limit="1" />
</txp:if_individual_article>

<txp:if_article_list>

<txp:if_category>
<!-- category page: display the sticky article first -->
<txp:article_custom category="Latest-News" form="news" limit="10" />

<txp:ob1_googlenav linkcurrent="1" ulid="googlenav" liselected="current" firsttext="First" previoustext="&laquo; Previous" nexttext="Next &raquo;" lasttext="Last" />

<txp:ob1_pagination firsttext="First" previoustext="Previous" nexttext="Next" lasttext="Last" ulclass="pagination" />

<txp:else />
<!-- section page: display the sticky article -->
<txp:article_custom status="live" category="Latest-News" form="news" limit=1 />
<!-- then the rest of the articles -->
<txp:article listform="list_articles" form="news" limit="10" />
</txp:if_category>
<txp:ob1_pagination firsttext="First" previoustext="Previous" nexttext="Next" lasttext="Last" ulclass="pagination" />
</txp:if_article_list>

Anyyone have any idea whats going worng here?? this should work all i want to do is list 6 articles in the Latest-News category and then show pagination ;(

Edit: Alex, if you edit this post (and your previous ones), you’ll see how code quoting works here on the forum ;)

Offline

#80 2007-12-16 12:04:09

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

Re: [plugin] [ORPHAN] ob1_pagination

Sorry about the ob1_googlenav – the code is copied from an older site. If you replace all those instances with ob1_pagination you should be fine.

Its a little unclear what is wrong because I don’t know what actually happens, nor what you want to happen…?

Offline

#81 2007-12-16 12:55:24

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

Re: [plugin] [ORPHAN] ob1_pagination

OK I will try and show you what i am trying to do…

these pages show the pagination <prev 1 2 last> etc

  • http://www.westlondonlln.org/heathrow-news
  • http://www.westlondonlln.org/stem-news
  • http://www.westlondonlln.org/health-social-care-news

and in the

  • http://www.westlondonlln.org/news

I am trying to display all the news articles from the above sections and then have the pagination.

So each article I have gets added into their unique section and any of the article i want in the /news section i add to the category Latest-News.

So concluding… news section to display list of articles in category Latest-News.

Make sense?

Offline

#82 2007-12-16 13:06:44

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

Re: [plugin] [ORPHAN] ob1_pagination

So why not just use:

<txp:article status="live" category="Latest-News" form="news" limit=1 />

Instead of:

<txp:article_custom status="live" category="Latest-News" form="news" limit=1 />

I don’t think article_custom supports paging.

Offline

#83 2007-12-16 14:04:25

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

Re: [plugin] [ORPHAN] ob1_pagination

I have changed it to the following code on here

  • http://www.westlondonlln.org/news

It now shows the first article, then 4 articles that are in the ‘news’ section, and then pagination – but as you paginate through it only shows 1 article in the ‘news’ section.

<!-- section page: display the sticky article -->
<txp:article status="live" category="Latest-News" form="news" limit="1" />
<!-- then the rest of the articles -->
<txp:article form="news" limit="10" />
<div class="paginationwrap">
<txp:ob1_pagination firsttext="First" previoustext="Previous" nexttext="Next" lasttext="Last" ulclass="pagination" />
</div>

Offline

#84 2007-12-16 14:35:37

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

Re: [plugin] [ORPHAN] ob1_pagination

I think you can change that to:

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

That would show the first two articles before paginating. It appears you have 4 articles in your section, hence the limit=“2” so you can check the pagination.

Last edited by jstubbs (2007-12-16 14:36:03)

Offline

Board footer

Powered by FluxBB