- Posts: 438
COMMUNITY FORUM
Item Navigation Loop
- Joe Campbell
-
Topic Author
- Offline
- Platinum Member
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
-
- Offline
- Platinum Member
- Posts: 15920
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.
Please Log in or Create an account to join the conversation.
- Joe Campbell
-
Topic Author
- Offline
- Platinum Member
- Posts: 438
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
-
- Offline
- Platinum Member
- Posts: 15920
Since a query would only be made when only two circumstances are met, chances are that the impact will be minimal.
Please Log in or Create an account to join the conversation.
- Joe Campbell
-
Topic Author
- Offline
- Platinum Member
- Posts: 438
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.
- Javi Mata
-
- Offline
- Senior Member
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
-
Topic Author
- Offline
- Platinum Member
- Posts: 438
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.
- Javi Mata
-
- Offline
- Senior Member
Twitter: @Javi_Mata
Web: www.javimata.com
Please Log in or Create an account to join the conversation.
- Joe Campbell
-
Topic Author
- Offline
- Platinum Member
- Posts: 438
Please Log in or Create an account to join the conversation.
- Javi Mata
-
- Offline
- Senior Member
Twitter: @Javi_Mata
Web: www.javimata.com
Please Log in or Create an account to join the conversation.
- Joe Campbell
-
Topic Author
- Offline
- Platinum Member
- Posts: 438
Have a GRRRRRREAT Weekend :)
Please Log in or Create an account to join the conversation.
- Joe Campbell
-
Topic Author
- Offline
- Platinum Member
- Posts: 438
As I perviously stated, this feature would be an ideal feature for K2v3 (Category > Item Navigation > Loop)
It would help retain UI integrity and it makes sense for most instances.
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
It does require some coding though. I will try to develop something in the coming days.
Please Log in or Create an account to join the conversation.
- Joe Campbell
-
Topic Author
- Offline
- Platinum Member
- Posts: 438
Please Log in or Create an account to join the conversation.
- Joe Campbell
-
Topic Author
- Offline
- Platinum Member
- Posts: 438
Please Log in or Create an account to join the conversation.
- Kannan Naidu Venugopal
-
- Offline
- Platinum Member
- Aham Brahmasmi
To me it seems a lot easier and cleaner if a function like getFirstItem and getLastItem is included in the model and view of K2, like the getNextItem and getPreviousItem function.
I like kittens, so don't hack the core :)
I also feel it's messy to do it inside template override, with all the query and urlencode. Maybe @Krikor is already writing a plugin for you :)
K2 Rocks \m/
Please Log in or Create an account to join the conversation.
- Mohamed Abdelaziz
-
- Offline
- Platinum Member
- Joomla Developer
Multiple Extra Fields Groups for K2
AutoMeta for K2
Chained Fields for K2
More K2 Extensions In My Extensions Store
Please Log in or Create an account to join the conversation.
- Joe Campbell
-
Topic Author
- Offline
- Platinum Member
- Posts: 438
github.com/getk2/k2-v3-dev-build/issues/295
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
Happy Easter :)
Please Log in or Create an account to join the conversation.
- Mohamed Abdelaziz
-
- Offline
- Platinum Member
- Joomla Developer
Easy hack to provide navigation loop for K2 items
Multiple Extra Fields Groups for K2
AutoMeta for K2
Chained Fields for K2
More K2 Extensions In My Extensions Store
Please Log in or Create an account to join the conversation.