Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2009-04-14 14:59:01

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

Re: txp:article_custom and pagination

You didn’t read the thread I linked to and you didn’t read the plugin documentation. How many people need to tell you that they’ve got it working before you give it a try?

Offline

#14 2009-04-14 20:31:05

aswihart
Member
From: Pittsburgh, PA
Registered: 2006-07-22
Posts: 345
Website

Re: txp:article_custom and pagination

Els, I did read the post, but it didn’t refer to sections, but categories, so while you are totally right about this, that post wasn’t conclusive to me that specifying sections would also work. I admit I didn’t read the entire plugin documentation. I just didn’t have any interest, given my problem was already solved.

For the good of everyone who is hotly anticipating the final conclusion to this drama, I just tested it, and it does work! I can’t get forms working with chh_article for some reason, but chh_article and chh_article_lib are getting uninstalled now, they were good while they lasted.

Thanks again Els, I just needed a little time to be able to try this out, sucks that I can’t play around with Textpattern all day!

EDIT: The reason the form didn’t work (scratched out text above) is I had to change the attribute to listform rather than form. txp:article will still use the form attribute when displaying an article list (if you don’t specify a listform attribute), while chh_article will only use the form attribute when you are displaying an individual article. Awesome!

Last edited by aswihart (2009-04-14 20:45:51)

Offline

#15 2009-08-07 06:29:38

tennapel
Member
Registered: 2009-05-31
Posts: 62

Re: txp:article_custom and pagination

aswihart wrote:

EDIT: All I am trying to do is show an article list with pagination on the front page of my site that includes only section="blog". I ended up finding an easy fix by making the blog section the only one that’s "On front page" on the sections setup screen. Now I can just use the <txp:article /> tag on the default page and it only looks at articles in the blog section.

Tip of the day! works fine.

Offline

#16 2009-09-29 15:38:26

KaiBo
New Member
Registered: 2009-09-16
Posts: 1

Re: txp:article_custom and pagination

I tackle with this behavior as well. Any workarounds mentioned here or found elsewhere sadly will not work for me (displaying specific categories in a different section). Having looked into the Sourcecode this behavior seems to be intended:

//do not paginate if we are on a custom list
if (!$iscustom and !$issticky)

article_custom is internally treated like a single article in more than one place. Hence Pagination seems to have been “disabled”. Anybody knows the deeper reason for this?

Offline

#17 2013-01-28 10:01:46

etc
Developer
Registered: 2010-11-11
Posts: 5,384
Website GitHub

Re: txp:article_custom and pagination

It would be nice (for pagination plugins authors) if article_custom minimally supported pgonly attribute, just returning the number of pages, without setting pagination data. Is it feasible?

Offline

#18 2013-04-14 00:25:03

madzzoni
Member
From: Grünberg/Hessen/DE
Registered: 2013-01-22
Posts: 38

Re: txp:article_custom and pagination

Hello. I would like to use the “default pagination” from the TXP 4.5.4 theme in my News-page, which shows a list of 5 article excerpts from Articles-section (and there is 8 in total) – but the pagination doesn’t seems to work with the “article_custom” txp-tag, or others than the <txp:if_individual_article> tag!

My code:

<div>
        <txp:article_custom excerpted="1" form="static_headline" section="articles" limit="5" />
</div>
        <p id="paginator">
                 <txp:if_article_custom>
                           <txp:variable name="prev" value='<txp:link_to_prev />' />
          <txp:variable name="next" value='<txp:link_to_next />' />
          <txp:if_variable name="prev" value="">
            <span id="paginator-l" class="button disabled">← <txp:text item="older" /></span>
          <txp:else />
            <a id="paginator-l" href="<txp:link_to_prev />" title="<txp:prev_title />" class="button">← <txp:text item="older" /></a>
          </txp:if_variable>
          <txp:if_variable name="next" value="">
            <span id="paginator-r" class="button disabled"><txp:text item="newer" /> →</span>
          <txp:else />
            <a id="paginator-r" href="<txp:link_to_next />" title="<txp:next_title />" class="button"><txp:text item="newer" /> →</a>
          </txp:if_variable>
         <txp:else />
          <txp:variable name="prev" value='<txp:older />' />
          <txp:variable name="next" value='<txp:newer />' />
          <txp:if_variable name="prev" value="">
            <span id="paginator-l" class="button disabled">← <txp:text item="older" /></span>
          <txp:else />
            <a id="paginator-l" href="<txp:older />" title="<txp:text item='older' />" class="button">← <txp:text item="older" /></a>
          </txp:if_variable>
          <txp:if_variable name="next" value="">
            <span id="paginator-r" class="button disabled"><txp:text item="newer" /> →</span>
          <txp:else />
            <a id="paginator-r" href="<txp:newer />" title="<txp:text item='newer' />" class="button"><txp:text item="newer" /> →</a>
          </txp:if_variable>
    </txp:if_article_custom>

Which txp-tag do i have to use to get the pagination active here??

Best regards,

madzzoni


<TXP:n00b />

Offline

#19 2013-04-14 00:53:44

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,315

Re: txp:article_custom and pagination

There’s no such tag as if_article_custom.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#20 2013-04-14 01:05:30

madzzoni
Member
From: Grünberg/Hessen/DE
Registered: 2013-01-22
Posts: 38

Re: txp:article_custom and pagination

Aha, – thx mate ;-) – and the <txp:if_individual_article> doesn’t work here … so any other suggestions perhaps?


<TXP:n00b />

Offline

#21 2013-04-14 19:25:08

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,315

Re: txp:article_custom and pagination

madzzoni wrote:

and the <txp:if_individual_article> doesn’t work here

No, correct, article_custom creates only article lists, even if restricted to output just one article.

If you need an article_custom tag, there are several solutions for a pagination: 3 here, another one here, one more here, and possibly further ones on TXPTips.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#22 2013-04-15 00:03:45

madzzoni
Member
From: Grünberg/Hessen/DE
Registered: 2013-01-22
Posts: 38

Re: txp:article_custom and pagination

Thanks uli, and yes i know about these plugin solutions you mention, – but they aren’t optimal for me, – i only need the previous/next page option, as in the default theme and just hoped for some kind of txp:tag workaround i 4.5.4.
I already tried the etc_pagination-plugin, but it doesn’t work in my page/setup.

We can hope for a native pagination system for if_article_custom pages too in the next TXP release ;-)


<TXP:n00b />

Offline

#23 2013-04-15 07:56:35

etc
Developer
Registered: 2010-11-11
Posts: 5,384
Website GitHub

Re: txp:article_custom and pagination

madzzoni wrote:

I already tried the etc_pagination-plugin, but it doesn’t work in my page/setup.

If it doesn’t, it will. :) Have you tried this:

<txp:etc_pagination pages='<txp:etc_numpages excerpted="1" section="articles" pageby="5" />'
	range="1" prev="Prev" next="Next" pgcounter="page" wraptag="nav" />

This will give you few page links, where you can hide (with css) everything except a[rel="prev"] and a[rel="next"]:

<style>nav a {display:none} nav a[rel="prev"], nav a [rel="next"] {display:inline}</style>

To output the correct page (given by page url parameter), use

<txp:article_custom excerpted="1" form="static_headline" section="articles" limit="5" offset='<txp:etc_offset pgcounter="page" />' />

Link to prev/next article is another story. You can do it all with etc_query, but this will require some learning.

There is no natural way to paginate <txp:article_custom />’s, because they can be many on the page, and it is not clear which list must be concerned by <txp:older/newer /> tags.

Offline

#24 2013-04-15 22:12:38

madzzoni
Member
From: Grünberg/Hessen/DE
Registered: 2013-01-22
Posts: 38

Re: txp:article_custom and pagination

Thanks etc :-) … I’ll try this option.


<TXP:n00b />

Offline

Board footer

Powered by FluxBB