Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: soo_page_numbers: page counting and navigation widgets
John, please see my edited explanation above. I didn’t realize that $thispage
does not get overridden. Hence pagination will be based on the first non-sticky, non-custom article
tag on the page, no matter where you put soo_page_links
.
Code is topiary
Offline
Re: soo_page_numbers: page counting and navigation widgets
Aha! Thank you for the guidance, Jeff. Here’s what was going on, for posterity:
My author pages on this site include author bios generated by smd_bio. The only way I could figure out to get smd_bio to recognize the author currently in context was to include txp:article tags with a limit
set to 1
— in the template, this takes place above the article list I want to paginate. They look like this:
<txp:article limit="1"><txp:smd_bio_info items="img_id">{smd_bio_img_id}</txp:smd_bio_info></txp:article>
With a limit of 1, a list that contained more than one article would show multiple pages, even if the article list containing the pagination had a threshold of thirty articles per page.
Based on your edited explanation, this addition above the txp:if_author
block, gave soo_page_links the correct number of pages:
<txp:if_article_list><txp:article pgonly="1" limit="30"/>
<txp:if_author>
... Author info ...
Offline
Re: soo_page_numbers: page counting and navigation widgets
i don t understand, why paginations don’t work for me…
i doin all right.
Last edited by Katalonian (2010-07-09 08:00:07)
<txp:txp_me />
Offline
#100 2010-07-09 09:47:04
Re: soo_page_numbers: page counting and navigation widgets
I’m sorry you’re having problems, but you’ve posted no information that allows me to help you. If nothing else please post or link to a tag trace.
Code is topiary
Offline
#101 2010-07-30 09:07:17
Re: soo_page_numbers: page counting and navigation widgets
if you don’t need soo_txp_obj for something else. Delete the require_plugin(‘soo_txp_obj’) line, and paste in the following two classes from soo_txp_obj: soo_obj (at the top of soo_txp_obj) and soo_uri (at the bottom).
I´m not a php crack, please which 2 classes I need? I don´t understand the php code and I don´t know where the class beginns and stops
Offline
#102 2010-07-30 20:20:46
Re: soo_page_numbers: page counting and navigation widgets
Simplest thing is to keep the two plugins as is. But to answer your question, copy everything from the line
class soo_uri
up to
# --- END PLUGIN CODE
Just be aware that if you copy too much or too little, you can disable the entire site.
Edited by net-carver to show the end line as code.
Last edited by net-carver (2010-07-30 21:15:28)
Code is topiary
Offline
#103 2010-07-31 05:23:23
Re: soo_page_numbers: page counting and navigation widgets
Thanks jsoo
Offline
#104 2011-01-18 12:24:28
Re: soo_page_numbers: page counting and navigation widgets
Version 0.3.0 released. Thanks to much help from the Txp community, soo_page_numbers now speaks your language. That is, if you speak one of the 21 languages included in the plugin’s Textpack for preformatted output (e.g., “Page 1 of 2”) The plugin now also uses Txp’s built-in language item for “Page” in link titles (e.g., <a href=”/?pg=2” title=“Page 2”>2</a>).
Code is topiary
Offline
#105 2011-03-31 14:06:29
Re: soo_page_numbers: page counting and navigation widgets
Hi Jeff,
Thank you for developing this plug-in, it’s very useful particularly as ob1_pagination appears to have disappeared.
I’m working-up a page where I’m looking at adding pagination to article lists but it seems to be counting individual articles rather than treating each block as a page. You can see it in action here, I have 5 test articles with a limit of 3 per page so the pagination should indicate 2 pages. My code is:
<txp:if_article_list>
<txp:article_custom allowoverride="0" form="article_post" limit="3" offset="1" pgonly="0" section="news" sort="Posted desc" status="4" />
<txp:soo_page_links />
</txp:if_article_list>
I may be doing it all wrong but would appreciate any help, thanks.
Offline
#106 2011-03-31 14:56:17
Re: soo_page_numbers: page counting and navigation widgets
Jeff can correct me if I’m wrong, but soo_page_numbers determines pagination based on the limit
of the first txp:article or txp:article_custom tag on the page, even if it’s up in your document head.
One work-around is to put a txp:article tag higher up in the page with the exact offset and limit elements you want for pagination, and set pgonly
to 1
.
Edit: Fix speeling and englash.
Last edited by johnstephens (2011-03-31 14:57:01)
Offline
#107 2011-04-01 10:35:56
Re: soo_page_numbers: page counting and navigation widgets
Thanks John, I’ll try that.
Offline
#108 2011-04-02 01:50:30
Re: soo_page_numbers: page counting and navigation widgets
John: thanks for stepping in — I’m not at the computer much this week. Almost correct; pagination values are fixed by the first pagination-setting tag on the page. More explanation.
Code is topiary
Offline