- Posts: 15
COMMUNITY FORUM
scroll through k2 page module
- chris
-
Topic Author
- Offline
- New Member
www.kwkitchens.co.uk/index.php/component/k2/item/41-tiepolo-light-walnut-pisa if you see this one the k2 item is a door image, i would love it to be posible to scroll them by this page (with a little thumbnail!) is this possible?
thank you, k2 is a great addition to Joomla :)
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
Please Log in or Create an account to join the conversation.
- chris
-
Topic Author
- Offline
- New Member
- Posts: 15
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
Select a subscription.
There you have two options. The annual subscription and the 6-month one. Choose one and the site will guide you through.
Please Log in or Create an account to join the conversation.
- chris
-
Topic Author
- Offline
- New Member
- Posts: 15
Please Log in or Create an account to join the conversation.
- chris
-
Topic Author
- Offline
- New Member
- Posts: 15
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
You need to override your K2 template to add previous/next item images
an example code would be:
<span class="imgNavWrap"><img src="<?php echo $this->item->nextImageSmall; ?>" alt="<?php echo K2HelperUtilities::cleanHtml($this->item->nextTitle); ?>"/></span>
<span class="imgNavWrap"><img src="<?php echo $this->item->previousImageSmall; ?>" alt="<?php echo K2HelperUtilities::cleanHtml($this->item->previousTitle); ?>" /></span>
More on overrides can be found here:
getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates
Please Log in or Create an account to join the conversation.
- chris
-
Topic Author
- Offline
- New Member
- Posts: 15
Please Log in or Create an account to join the conversation.
- chris
-
Topic Author
- Offline
- New Member
- Posts: 15
Please Log in or Create an account to join the conversation.
- chris
-
Topic Author
- Offline
- New Member
- Posts: 15
com_k2/templates/default/item.php
next to the existing previous/next links
but doesnt seem to work....
Please Log in or Create an account to join the conversation.
- chris
-
Topic Author
- Offline
- New Member
- Posts: 15
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
Then you need to check the post I sent you to see if you followed the correct path and edited the correct files.
Further info on templates and overrides can be found here:
nuevvo.com/blog/item/84-k2-inheritance-sub-templating
Please Log in or Create an account to join the conversation.
- chris
-
Topic Author
- Offline
- New Member
- Posts: 15
Krikor wrote:
Then you need to check the post I sent you to see if you followed the correct path and edited the correct files.
Hi Krikor, you gave me the code but i dont know while file to place it in??
i believe the pagination is on "show" in category options.
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
The where I cannot tell you exactly, since I do not know your template.
This is the default item navigation which you need to extend.
<?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; ?>
You need to change the previous/next links to have them include images as well.
The snippet I sent you does exactly that.
PS. You must use K2's latest version.
Please Log in or Create an account to join the conversation.
- chris
-
Topic Author
- Offline
- New Member
- Posts: 15
But nothing is happening!
www.kwkitchens.co.uk/index.php/component/k2/item/56-steinberg-beech-tuscany
Chris
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
In the file you edited the navigation is on the bottom while on the link is on the top.
Make sure you followed the directions in the posts I sent you and you have edited the correct template.
If you did it and nothing changed then consult your template developer in case they have changed the default workflow of overrides.
Please Log in or Create an account to join the conversation.
- chris
-
Topic Author
- Offline
- New Member
- Posts: 15
The file im using is from the default folder:
/components/com_k2/templates/default/item.php
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
Please Log in or Create an account to join the conversation.
- chris
-
Topic Author
- Offline
- New Member
- Posts: 15
however when i open my K2 category in the backend it only gives me the choice to -use default- on the template.
C
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
You need to override the K2 template in your Joomla! template.
Please take a minute and follow the tutorials.
nuevvo.com/blog/item/84-k2-inheritance-sub-templating
If you only want to change all the items, you only need to edit the default template.
Please read the tutorial and follow the example.
Please Log in or Create an account to join the conversation.