Keyword

Scroll K2 item from a link

  • moonswolf
  • moonswolf's Avatar Topic Author
  • Offline
  • Junior Member
More
10 years 5 months ago #127658 by moonswolf
Scroll K2 item from a link was created by moonswolf
Hi, thankyou for all your informations on this forum.

I would ask you an information: i would know if is it possible to scroll from an item, to another, with a simple click on a link.

What i would do is this:

I've a category with 10 articles, sorted by date. When i'm on the secon article (for example) i would go on the next, only clicking on an arrow icon (maybe with a link) to go to the next article (the next always sorted.

Is this possible? And if yes, how can i to this?

Thankyou for all your help :)

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

More
10 years 5 months ago #127659 by Lefteris
Replied by Lefteris on topic Re: Scroll K2 item from a link
Hi. Do you mean in the same page or to go to a different item page? The only functionality that K2 has built in is the item navigation in the bottom of item page.

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

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

  • moonswolf
  • moonswolf's Avatar Topic Author
  • Offline
  • Junior Member
More
10 years 5 months ago #127660 by moonswolf
Replied by moonswolf on topic Re: Scroll K2 item from a link
Hi, thankyou for your reply :)

Yes i mean on the same page, so to be faster.
Is it possible?

If not, how can i move the navigation page to a module? (So to use the link as an arrow icon, right to go forward, and left to go back).

Thankyou as always.

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

More
10 years 5 months ago #127661 by Lefteris
Replied by Lefteris on topic Re: Scroll K2 item from a link
There is no built in AJAX navigation. If you are familiar with javascript you can do it on your own. Every item link can give you a raw version for using in AJAX requests by appending "?format=raw" to the URL. The navigation is not a module. You can only move it inside the item page. If you want to change it's markup you can always create a template override. To learn more about this please read getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates .

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

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

  • moonswolf
  • moonswolf's Avatar Topic Author
  • Offline
  • Junior Member
More
10 years 4 months ago #127662 by moonswolf
Replied by moonswolf on topic Re: Scroll K2 item from a link
Hi, thankyou for your answer.

And if i would use the same of item navigation, but put the navitagion link into a module?

I've 2 position, sticky on right and left, and i would link 2 arrows one for next and other for previous article.
Is it possible? And what link should i insert for previous and next?

Thankyou as always.

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

More
10 years 4 months ago #127663 by Lefteris
Replied by Lefteris on topic Re: Scroll K2 item from a link
You cannot put navigation into a module. K2 navigation links are dynamic and different for each item .

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

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

  • moonswolf
  • moonswolf's Avatar Topic Author
  • Offline
  • Junior Member
More
10 years 4 months ago #127664 by moonswolf
Replied by moonswolf on topic Re: Scroll K2 item from a link
Hi, thankyou for your answer.

But how can i put (also in php code) a link to go to the next or previous article of a K2 category?

Cause if i can do this, i can put that code in a module...and it could be really usefull.

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

More
10 years 4 months ago #127665 by Lefteris
Replied by Lefteris on topic Re: Scroll K2 item from a link
The code for going to next or previous item in a category can be found in the item.php file. However you cannot use this code in a module. This code is only available in the item view.

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

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

  • moonswolf
  • moonswolf's Avatar Topic Author
  • Offline
  • Junior Member
More
10 years 4 months ago #127666 by moonswolf
Replied by moonswolf on topic Re: Scroll K2 item from a link
Hi Lefteris, and thankyou for your fast answer.

So, if i can't put this code in a module, how can i create a new code to go next or previous on a category?

Do you know how to code this?

Or if is there already an ext for this?

Thankyou again.

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

More
10 years 4 months ago #127667 by Lefteris
Replied by Lefteris on topic Re: Scroll K2 item from a link
You first need to clarify what you want to do. When you are on a category page you are viewing a list of items. What will the next and previous links will do? Take you to the next category? The next page of items? Since you are viewing a list of items there is no next and previous item, there is only next and previous page of items.

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

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


Powered by Kunena Forum