Keyword

Item Navigation Loop

  • Joe Campbell
  • Joe Campbell's Avatar Topic Author
  • Offline
  • Platinum Member
More
8 years 6 months ago #152155 by Joe Campbell
Item Navigation Loop was created by Joe Campbell
How can I modify the item override file to provide a previous and next for the first and last item in a category. (otherwise each would be none)

Here's the logic:


If first category item render last item as previous link

If last category item display first item as next link

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 6 months ago #152164 by Krikor Boghossian
Replied by Krikor Boghossian on topic Item Navigation Loop
Basically you want to create an infinite loop, right?
That would mean, either hacking K2's model or using an extension.
If you only want to use overrides, then you have to manually query the db and display that item.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Joe Campbell
  • Joe Campbell's Avatar Topic Author
  • Offline
  • Platinum Member
More
8 years 6 months ago #152170 by Joe Campbell
Replied by Joe Campbell on topic Item Navigation Loop
Yes, an infinite loop.

I would prefer to not hack, but querying the DB would impact performance, right?

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 6 months ago #152181 by Krikor Boghossian
Replied by Krikor Boghossian on topic Item Navigation Loop
Not really, provided that you use caching of course.
Since a query would only be made when only two circumstances are met, chances are that the impact will be minimal.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Joe Campbell
  • Joe Campbell's Avatar Topic Author
  • Offline
  • Platinum Member
More
8 years 6 months ago #152189 by Joe Campbell
Replied by Joe Campbell on topic Item Navigation Loop
I am not using caching.

Can this be a feature added to K2v3 (Category > Item Navigation > Loop) ???

I think it makes sense for most instances - plus I believe would be beneficial from an SEO standpoint as well.

Please Log in or Create an account to join the conversation.

More
8 years 6 months ago #152194 by Javi Mata
Replied by Javi Mata on topic Item Navigation Loop
i dont know, but if that need is a carrousel of item can use a jquery plugin

if need display the items like a carrousel can use one like:
kenwheeler.github.io/slick/

Twitter: @Javi_Mata
Web: www.javimata.com

Please Log in or Create an account to join the conversation.

  • Joe Campbell
  • Joe Campbell's Avatar Topic Author
  • Offline
  • Platinum Member
More
8 years 6 months ago #152197 by Joe Campbell
Replied by Joe Campbell on topic Item Navigation Loop
Thanks for the link @JaviMata but I am looking to use the built in Item Navigation.

Perhaps this example will help illustrate my point:

This is the LAST item (NO Next item link): I want it to display a next (link to first item in category)
demo.nuevvo.com/sites/j3x/janaro/index.php?option=com_k2&view=item&id=31:2001-a-space-odyssey&Itemid=171

This is the FIRST item (NO Previous item link): I want it to display a previous (link to last item in category)
demo.nuevvo.com/sites/j3x/janaro/index.php?option=com_k2&view=item&id=13:dear-white-people&Itemid=171

Please Log in or Create an account to join the conversation.

More
8 years 6 months ago #152200 by Javi Mata
Replied by Javi Mata on topic Item Navigation Loop
oh, sorry, i don't understand what need do it :-(

Twitter: @Javi_Mata
Web: www.javimata.com

Please Log in or Create an account to join the conversation.

  • Joe Campbell
  • Joe Campbell's Avatar Topic Author
  • Offline
  • Platinum Member
More
8 years 6 months ago #152202 by Joe Campbell
Replied by Joe Campbell on topic Item Navigation Loop
@JaviMata can you provide demo links to your extensions? I would like to see how they work :)

Please Log in or Create an account to join the conversation.

More
8 years 6 months ago #152205 by Javi Mata
Replied by Javi Mata on topic Item Navigation Loop
in the next days will do it, and upload more modules :-)

Twitter: @Javi_Mata
Web: www.javimata.com

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum