Keyword

Previous / Next buttons in external position? *new

More
10 years 9 months ago - 10 years 9 months ago #122737 by edger
Greetings, First off congratulations on a fine content manager!

Was wondering if it is possible to have simple previous / next buttons in a position like "header"
these buttons would page through k2 content by date ?

If someone can point me in the right direction i will be able to cobble it together :)
Thanks

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

More
10 years 9 months ago - 10 years 9 months ago #122738 by edger
At it's most basic i want to be able to put what K2 already puts at the bottom of articles, in its own position somewhere else on the site.

so i want to use "itemprevious" and "itemnext" classes in custom code module loaded into a postion of my choice.

:silly:

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 9 months ago #122739 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: K2 Previous / Next buttons in external position?
To use that code in a custom module you need to develop a K2 plugin.

It is easier if you modify your template and use absolute/fixed positioning instead.

To learn more about template overriding please read this post: 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.

More
10 years 9 months ago #122740 by edger
Hi Krikor,

yes i made some progress doing just that!
i managed to move the navigation block to where i wanted :)

now is it possible to change the next and previous links to pictures or even button style?
it is important that id dont have words just icon style

Thank you for any help :)

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 9 months ago #122741 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: K2 Previous / Next buttons in external position?
If you are using the 2.6.8 DEV build, it is possible to retrieve the $item->image as well.

Something like this will do the trick
<img src="<?php echo $this->item->previousImageSmall; ?>" alt="<?php echo K2HelperUtilities::cleanHtml($this->item->previousTitle); ?>" class="right" />

<img src="<?php echo $this->item->nextImageSmall; ?>"  alt="<?php echo K2HelperUtilities::cleanHtml($this->item->nextTitle); ?>" class="left" />

If you want to add arrows as well you have to use CSS.

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