Textpattern CMS support forum

You are not logged in. Register | Login | Help

#211 2017-10-28 18:28:20

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 731
Website

Re: etc_pagination: paginate everything

So far so good > joopvos.nl/test … :)

If you click on an image (thumbnail) you’ll land on an individual page. A sub navigation (arrows) brings you to the next, prev or the thumbnails … on page 1 … always. That’s not what I want if you departed from page 2 or 3. It must bring you back to the same page. The next and prev arrows are going to the beginning and/or end of all the individual pages. That’s not what I want.

I’ve read that etc_pagination doesn’t work with/on individual pages. Nevertheless … is it possible with or without etc_pagination to accomplish this behaviour?

The form with the sub navigation >

<article role=“article” itemscope itemtype=“http://schema.org/Article”>

<div class=“section_nav”><span><txp:jra_link_to_prev sort=“position asc” showalways=“1”>&#60;</txp:jra_link_to_prev></span> | <span><a href=”<txp:site_url /><txp:section />”>&#60;</a></span> | <span><txp:jra_link_to_next sort=“position asc” showalways=“1”>&#62;</txp:jra_link_to_next></span></div>

<h1 itemprop=“name”><txp:title /></h1>

<div itemprop=“articleBody”>
<txp:body />
</div>

</article>

BTW … I’m using the stm_article_order plugin with the jra_links plugin because the last one works nicely with the first one (tip!) … :)

Last edited by RedFox (2017-10-30 09:07:47)

Offline

#212 2017-10-30 11:25:30

etc
Developer
Registered: 2010-11-11
Posts: 3,042
Website

Re: etc_pagination: paginate everything

Hi Joop, if I get you right, you want to constraint the next/prev/up links to page limits? Can not think of a core way, but etc_link_to almost does it. Leave me a day or two to get rid of “almost” :-)


etc_[ query | search | pagination | date | tree | cache ]

Offline

#213 2017-10-30 15:14:28

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 731
Website

Re: etc_pagination: paginate everything

Thanks Oleg … I’m preparing myself to get familiar with etc_link_to and I discovered that the plugin works well with smd_article_order too … :)

<div class=“section_nav”><span><txp:etc_link_to target=“prev” sort=“position asc” showalways=“1”>&#60;</txp:etc_link_to></span> | <span><a href=”<txp:site_url /><txp:section />”>&#60;</a></span> | <span><txp:etc_link_to target=“next” sort=“position asc” showalways=“1”>&#62;</txp:jra_link_to></span></div>

On the other hand I think showalways="1" brings you back to the first thumbnail page … !?

Last edited by RedFox (2017-10-30 15:24:31)

Offline

#214 2017-11-02 22:47:44

etc
Developer
Registered: 2010-11-11
Posts: 3,042
Website

Re: etc_pagination: paginate everything

So, install etc_link_to.0.4.7 and try

<div class="section_nav">
<span><txp:etc_link_to target="prev" pageby="4" showalways="1">&#60;</txp:etc_link_to></span>
 | 
<span><a href="<txp:site_url /><txp:section />?page=<txp:etc_link_page pageby='4' />">&#60;</a></span>
 | 
<span><txp:etc_link_to target="next" pageby="4" showalways="1">&#62;</txp:etc_link_to></span>
</div>

showalways="1" means that (unlinked) arrows will be shown even if there is no next/prev article. Hope that helps.


etc_[ query | search | pagination | date | tree | cache ]

Offline

#215 2017-11-03 06:54:59

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 731
Website

Re: etc_pagination: paginate everything

Thanks Oleg. The link to the specific landing page (we have now 4 of these) does work (arrow up) … :)

The links to the next and previous individual page do work too. Only when you’re at the first or last individual page you’re directed to the (first) specific landing page. It would be nice if the arrow in that case wasn’t a link at all. Because there is no individual page left. Nor on the ‘left’; nor on the ‘right’. Can that be done?

Oleg, would access to the back-end (Textpattern) of the test site be of any help?

Last edited by RedFox (2017-11-03 10:26:20)

Offline

#216 2017-11-03 10:18:35

etc
Developer
Registered: 2010-11-11
Posts: 3,042
Website

Re: etc_pagination: paginate everything

Sorry, Joop, the problem was on my side. Please redownload and retry.


etc_[ query | search | pagination | date | tree | cache ]

Offline

#217 2017-11-03 10:22:40

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 731
Website

Re: etc_pagination: paginate everything

Super Oleg. Thanks a lot … :)

PS
The file name of the download is still v.4.6 … :o

Last edited by RedFox (2017-11-03 10:29:15)

Offline

#218 2017-11-03 10:58:00

etc
Developer
Registered: 2010-11-11
Posts: 3,042
Website

Re: etc_pagination: paginate everything

RedFox wrote #307638:

The file name of the download is still v.4.6 … :o

I still have not found an easy way to change the filename on replace.


etc_[ query | search | pagination | date | tree | cache ]

Offline

#219 2017-11-16 02:24:04

hn1255
New Member
From: China
Registered: 2017-11-16
Posts: 6

Re: etc_pagination: paginate everything

I think it is powful.

Offline

#220 2018-04-25 16:40:45

robhert
Member
From: Perú
Registered: 2007-04-27
Posts: 198
Website

Re: etc_pagination: paginate everything

Hi etc. For some reason I can not get pagination on my site using article_custom.

<main id="content" class="white-background">
   <div class="container">
      <div class="row blog-listing has-sidebar">
         <div class="col-12">
            <txp:article_custom sort="Posted desc" section="blog" limit="1">
            <article class="post featured <txp:if_article_image>has-thumbnail</txp:if_article_image>">
               <txp:if_article_image><a href="<txp:permlink />" class="feature-image-link"><txp:article_image width="1180" height="680" alt="" /></a></txp:if_article_image>
               <div class="post-details">
                  <h3><a href="<txp:permlink />"><txp:title /></a></h3>
                  <hr>
                  <txp:excerpt />
                  <a href="<txp:permlink />" class="read-more">Continuar <i class="saulticon-arrow-forward"></i></a>
               </div>
            </article>
            </txp:article_custom>
         </div>
         <div class="col-12 col-lg-8 col-xl-9" id="box">
            <div class="grid" data-masonry='{ "itemSelector": ".grid-item", "columnWidth": ".grid-sizer", "gutter": ".gutter-sizer", "percentPosition": true, "transitionDuration": "0.3s" }'>
               <txp:article_custom sort="Posted desc" offset="1" limit="4" section="blog" form="blog" />
               <div class="grid-sizer"></div>
               <div class="gutter-sizer"></div>
            </div>
            <p class="extra-margin-bottom text-center">
               <txp:etc_pagination range="2" prev="Previous" next="Next"  wraptag="ul" break="li" />
            </p>
         </div>
      </div>
   </div>
</main>

As you can see there are two <article_custom /> tags, one for the featured post (Top), and the other for a list of “blog” articles. But no matter which <txp:etc_pagination /> I try, always I get no output. Empty. Any ideas? Thank you for your help.

Edit: PS. There are 6 articles in blog section.

Last edited by robhert (2018-04-25 16:43:50)

Offline

Board footer

Powered by FluxBB