Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-12-11 04:43:53

alexm
New Member
Registered: 2005-11-27
Posts: 7

implementing next/previous category links

I’m fairly new to textpattern and i’m trying to set up an image gallery on my <a href=“http://canberratrials.com” target=”_blank”>site</a> using rss_thumbpop. Everything works as I would like it to except for when I want to set a limit to how many images are displayed on a page.

If I set a limit, the page links are automatically generated, which is great, however they link to the wrong place. They link to the section the images reside in and not /section/id/title?pg=2. I have no idea how to fix this problem and from what I’ve been reading, you can’t have next/previous links in categories. Is this true?

Here are links to my problems.

<a href=“http://canberratrials.com/photography/” target=”_blank”>Gallery</a>
<a href=“http://canberratrials.com/photography/7/miscellaneous” target=”_blank”>/section/id/title with limit set to 1 </a>

Next link points to:
http://canberratrials.com/photography/?pg=2, instead of
http://canberratrials.com/photography/7/miscellaneous?pg=2

If anyone could help, even a little, that would be really appreciated!

Alex

Last edited by alexm (2005-12-11 04:45:36)

Offline

#2 2005-12-11 13:10:22

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: implementing next/previous category links

What tag(s) are you using to generate the next/previous links? If you are using <txp:newer> and <txp:older> (and I gather that rss_thumbpop generates these tags if you use the plugin’s paging option) then the behavior you are getting is what it should be. These tags always link to article lists and not individual articles. This approach can almost certainly be made to give the results you want, with some adjustment of your page template and/or article form (post code if you want more suggestions). However, if you want to link to individual articles, try link_to_next.


Code is topiary

Offline

#3 2005-12-11 13:50:16

alexm
New Member
Registered: 2005-11-27
Posts: 7

Re: implementing next/previous category links

here is my single gallery FORM code:

<XMP><p><txp:title /></p>
<txp:rss_thumbpop articlethumbs=“1” mode=“float” clickonly=“1” limit=“1” /></XMP>

This is automatically generating the next/back links but i can’t find any code where it is possible to change what sort of links it calls.

and then my code for single gallery on my photography SECTION:

<XMP><txp:if_individual_article>
<txp:article form=“gallery-single” />
</txp:if_individual_article></XMP>

Sorry I’m slow with this, what sort of code would be most helpful, code from the plugin?

P.S. Doubly sorry for the failure of implementing code into my post.

Last edited by alexm (2005-12-11 13:56:44)

Offline

#4 2005-12-11 17:07:29

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: implementing next/previous category links

sorry for the failure of implementing code into my post

http://textpattern.com/faq/43/how-do-i-post-tags-and-code-on-the-forum

Back to the main question, I’m not an rss_thumbpop user so take all this with a grain of salt. But it seems to me that that plugin generates article lists. So you want to set up your templating a little differently. Here’s one way you might want to try it:

In your page template for the gallery section, remove the if_individual_article tags, leaving the txp_article tag in place. But give the tag a listform attribute, as well as the form attribute, so that each names a different form.

Use rss_thumbpop in the form for article lists (the form named in your listform attribute, above).

Then in the other form, use <txp:article_image /> and whatever other elements you want for the full-size image display. I may have misunderstood how you want to arrange your gallery, but at any rate, I hope this gets you on the right track.


Code is topiary

Offline

#5 2005-12-11 23:24:00

alexm
New Member
Registered: 2005-11-27
Posts: 7

Re: implementing next/previous category links

Okay, I tried and failed with that approach unfortunately. I’ll post all the code from all the related places. Thanks for your help so far!!

form gallery-list<code>
<li id=“float”><txp:permlink><txp:category1 /><p><txp:title /></p>
<txp:article_image /></txp:permlink>
<txp:excerpt /></li>
</code>

form gallery-single<code>
<p><txp:title /></p>
<txp:rss_thumbpop articlethumbs=“1” mode=“float” clickonly=“1” limit=“1” />
</code>

My gallery page code<code>
<txp:if_article_list>
<txp:article_custom sortdir=“asc” form=“gallery-list” category=“photography” section=“photography” />
</txp:if_article_list>
</code><code>
<txp:if_individual_article>
<txp:article form=“gallery-single” />
</txp:if_individual_article>
</code>

My aim with this gallery is to have it as is, although for each article id, I would like to be able to set a limit to how many images are shown each page. I think this would be useful if i had a lot of images but didn’t want to slow down load time too much. So basically, I love my gallery-list page and how it links to the gallery-single, but I just want to be able to set a limit on the gallery-single page and be able to use the next/back links to navigate through.

Sorry for the lack of knowledge, but also thanks for all the help!

Last edited by alexm (2005-12-11 23:25:18)

Offline

#6 2005-12-12 00:07:25

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: implementing next/previous category links

Yeah, hopefully someone more familiar with the plugin will chime in on this, because I think I have been making overly-complicated suggestions.

But I suspect the issue is that you are calling rss_thumbpop on your individual article form, when you should really be using this in your list form. Again, I don’t use the plugin so I really don’t have a feel for how to use it.


Code is topiary

Offline

#7 2005-12-13 01:31:47

alexm
New Member
Registered: 2005-11-27
Posts: 7

Re: implementing next/previous category links

Is anyone able to chime in and help on this one? Or recommend another gallery plugin? I’m having no luck, although I do have a solution, it isn’t what I would prefer to do.

Offline

Board footer

Powered by FluxBB