Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: [plugin] [ORPHAN] jk_neighbour: just like link_to_next/prev, only a bit better
err: txp:jk_link_to_next :)
Offline
Re: [plugin] [ORPHAN] jk_neighbour: just like link_to_next/prev, only a bit better
Hmmm. v0.6 doesn’t seem to output anything, with/without the “atts” attribute. My usage is like so:
<txp:jk_link_to_prev cat="current" sortby="custom_1">next project<br /><txp:prev_title /></txp:jk_link_to_prev>
Maybe I’ll take a look at it later today and see if I can’t help fix it. Thanks, though! Cheers!
Offline
Re: [plugin] [ORPHAN] jk_neighbour: just like link_to_next/prev, only a bit better
problems all over the place… should be working now!
Offline
Re: [plugin] [ORPHAN] jk_neighbour: just like link_to_next/prev, only a bit better
Thanks, Jeff. It’s outputting and styling correctly (I added atts=‘class=“neighbour-link”’), but the sorting seems off. I’m using “posted” in one instance and “custom_1” in another. When I use “posted” it’s actually posting a link to itself. In the “custom_1” instance, the jk_link_to_next seems fine, but jk_link_to_prev seems to (almost) always display the last article in the sort order.
If it helps, here’s the code and links to the pages:
http://www.zeibin.com/projects/26/drift
uses
<p style="float:left; text-align:left;"><txp:jk_link_to_next cat="current" sortby="custom_1" atts=' class="neighbour-link"'>previous project<br /><txp:next_title /></txp:jk_link_to_next></p>
<p style="float:right; text-align:right;"><txp:jk_link_to_prev cat="current" sortby="custom_1" atts=' class="neighbour-link"'>next project<br /><txp:prev_title /></txp:jk_link_to_prev></p>
http://www.zeibin.com/resources/45/type-design
uses
<p style="float:left; text-align:left;"><txp:jk_link_to_prev cat="current" sortby="posted" atts=' class="neighbour-link"'>previous resource<br /><txp:prev_title /></txp:jk_link_to_prev></p>
<p style="float:right; text-align:right;"><txp:jk_link_to_next cat="current" sortby="posted" atts=' class="neighbour-link"'>next resource<br /><txp:next_title /></txp:jk_link_to_next></p>
Offline
#77 2008-07-17 01:09:25
- sethexis
- Member
- Registered: 2008-04-16
- Posts: 10
Re: [plugin] [ORPHAN] jk_neighbour: just like link_to_next/prev, only a bit better
i have same issue. it’s non functional with posted beyond one link.
the links are generated with the following code:
| <txp:jk_link_to_prev cat="current" showalways="1" sortby="posted">BACK </txp:jk_link_to_prev> | txp:jk_link_to_next cat="current" showalways="1" sortby="posted">NEXT</txp:jk_link_to_next> |
Last edited by sethexis (2008-07-17 01:26:35)
Offline
#78 2008-08-01 15:25:43
- smallt
- Member
- Registered: 2004-12-21
- Posts: 26
Re: [plugin] [ORPHAN] jk_neighbour: just like link_to_next/prev, only a bit better
This is a life-saving plugin for me … and apparently a number of other individuals. The one bit of functionality I would love to see, which would help me a great deal, is that when at the end of a list, the plugin not generate a link to the article shown. Meaning, that currently when using the sortby=“posted” method, the plugin still generates a link to the next or previous item when in fact there are no more to show. The result is a link to the article shown. Does anyone have an idea for how to work around this? Again, I really appreciate the contribution of this fine plugin and any help with this small issue would be excellent.
Offline
Re: [plugin] [ORPHAN] jk_neighbour: just like link_to_next/prev, only a bit better
smallt – let me look into this over the weekend.
Offline
#80 2008-08-01 20:04:34
- smallt
- Member
- Registered: 2004-12-21
- Posts: 26
Re: [plugin] [ORPHAN] jk_neighbour: just like link_to_next/prev, only a bit better
hey thanks Jeff. I really appreciate it!
Offline
Re: [plugin] [ORPHAN] jk_neighbour: just like link_to_next/prev, only a bit better
Hi smallt, I can’t replicate that behaviour. Can you post a link and the code you are using. Also, any debug info on that “final” page.
Offline
#82 2008-08-11 16:55:55
- smallt
- Member
- Registered: 2004-12-21
- Posts: 26
Re: [plugin] [ORPHAN] jk_neighbour: just like link_to_next/prev, only a bit better
Hello Jeff, thank you for having a look. Following is a link pages using the plugin: http://www.maya.com/portfolio/carnegie-library
on the top right-hand corner of each page in this section you will find a “Previous Case Study” and “Next Case Study” link. The problem I am having and you will be able to reproduce is that when you reach the end of the list, the previous and next links remain with either the previous or next link referring to the current article (depending of course on which end of the list you have arrived at). My desired functionality is that when at the end of the list, the word “next” or “previous” remain but there be the ability to possibly change the class of the item or remove the <a href=”“>.
Is this difficult? Again, thank you for any/all help!
Offline
Re: [plugin] [ORPHAN] jk_neighbour: just like link_to_next/prev, only a bit better
Classic solution/workaround (without jk_neighbour)
(wrapped for better reading)
<txp:chh_if_data><txp:link_to_next><<< Newer</txp:link_to_next></txp:chh_if_data>
<txp:link_to_home>Home</txp:link_to_home>
<txp:chh_if_data><txp:link_to_prev>Older >>></txp:link_to_prev></txp:chh_if_data>
- Plug-In needed: chh_if_data
- Just add single spaces between the ‘blocks’ to get simple spacing
- txp:chh_if_data accepts txp:else
Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML
Offline
Re: [plugin] [ORPHAN] jk_neighbour: just like link_to_next/prev, only a bit better
smallt, even if you go with Markus’ hint, can you post the post you are using, and the mysql select code (turn on debug -> view source). Still can’t replicate this on my end.
Offline