- Posts: 30
COMMUNITY FORUM
Scroll K2 item from a link
- moonswolf
-
Topic Author
- Offline
- Junior Member
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.
- Lefteris
-
- Offline
- Platinum Member
- Posts: 8743
Please Log in or Create an account to join the conversation.
- moonswolf
-
Topic Author
- Offline
- Junior Member
- Posts: 30
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.
- Lefteris
-
- Offline
- Platinum Member
- Posts: 8743
Please Log in or Create an account to join the conversation.
- moonswolf
-
Topic Author
- Offline
- Junior Member
- Posts: 30
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.
- Lefteris
-
- Offline
- Platinum Member
- Posts: 8743
Please Log in or Create an account to join the conversation.
- moonswolf
-
Topic Author
- Offline
- Junior Member
- Posts: 30
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.
- Lefteris
-
- Offline
- Platinum Member
- Posts: 8743
Please Log in or Create an account to join the conversation.
- moonswolf
-
Topic Author
- Offline
- Junior Member
- Posts: 30
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.
- Lefteris
-
- Offline
- Platinum Member
- Posts: 8743
Please Log in or Create an account to join the conversation.
- moonswolf
-
Topic Author
- Offline
- Junior Member
- Posts: 30
I would go next and prev when i'm in an item page, not in the category view.
So, when i'm reading an article, goes to the next article (of that category) or previous, simply with a click, that i would put on the sticky right position (that i've in my template).
So i can go prev or next article, simply clicking on that link.
Please Log in or Create an account to join the conversation.
- Lefteris
-
- Offline
- Platinum Member
- Posts: 8743
Please Log in or Create an account to join the conversation.
- moonswolf
-
Topic Author
- Offline
- Junior Member
- Posts: 30
Please Log in or Create an account to join the conversation.
- Lefteris
-
- Offline
- Platinum Member
- Posts: 8743
Please Log in or Create an account to join the conversation.
- moonswolf
-
Topic Author
- Offline
- Junior Member
- Posts: 30
Could you tell me what piece of code should i move on the index.php to change the position of the item navigation?
Thankyou as always.
Please Log in or Create an account to join the conversation.
- Lefteris
-
- Offline
- Platinum Member
- Posts: 8743
<?php if($this->item->params->get('itemNavigation') && !JRequest::getCmd('print') && (isset($this->item->nextLink) || isset($this->item->previousLink))): ?>
<!-- Item navigation -->
<div class="itemNavigation">
<span class="itemNavigationTitle"><?php echo JText::_('K2_MORE_IN_THIS_CATEGORY'); ?></span>
<?php if(isset($this->item->previousLink)): ?>
<a class="itemPrevious" href="<?php echo $this->item->previousLink; ?>">
« <?php echo $this->item->previousTitle; ?>
</a>
<?php endif; ?>
<?php if(isset($this->item->nextLink)): ?>
<a class="itemNext" href="<?php echo $this->item->nextLink; ?>">
<?php echo $this->item->nextTitle; ?> »
</a>
<?php endif; ?>
</div>
<?php endif; ?>
Please Log in or Create an account to join the conversation.