- Posts: 6
COMMUNITY FORUM
Previous / Next buttons in external position? *new
- edger
-
Topic Author
- Offline
- New Member
Less
More
11 years 4 months ago - 11 years 4 months ago #122737
by edger
Previous / Next buttons in external position? *new was created 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
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.
- edger
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 6
11 years 4 months ago - 11 years 4 months ago #122738
by edger
Replied by edger on topic Re: K2 Previous / Next buttons in external position?
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:
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
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
11 years 4 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
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
Please Log in or Create an account to join the conversation.
- edger
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 6
11 years 4 months ago #122740
by edger
Replied by edger on topic Re: K2 Previous / Next buttons in external position?
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 :)
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
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
11 years 4 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
If you want to add arrows as well you have to use CSS.
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.
Please Log in or Create an account to join the conversation.