COMMUNITY FORUM
Display Disabled Item Navigation
- JxnGraphix
-
Topic Author
- Offline
- Junior Member
Less
More
8 years 11 months ago #155166
by JxnGraphix
Display Disabled Item Navigation was created by JxnGraphix
HI JW,
I currently have 'item navigation' enabled. I created a template override and changed the existing settings to display 'previous' and 'next' buttons instead of the default text. The current PHP allows the 'previous' and 'next' buttons to display ONLY when a 'previous' and 'next' item is present. This works correctly but I'd like to change it.
The objective is to ALSO display a "disabled" version of the 'previous' and 'next' buttons WHEN there is no 'previous' and 'next' item available. I have tried to change the itemNavigation section of the item.php 'isset' to 'empty' and 'is_null' but neither of these worked. Is the objective possible and how would I go about editing the code?
I currently have 'item navigation' enabled. I created a template override and changed the existing settings to display 'previous' and 'next' buttons instead of the default text. The current PHP allows the 'previous' and 'next' buttons to display ONLY when a 'previous' and 'next' item is present. This works correctly but I'd like to change it.
The objective is to ALSO display a "disabled" version of the 'previous' and 'next' buttons WHEN there is no 'previous' and 'next' item available. I have tried to change the itemNavigation section of the item.php 'isset' to 'empty' and 'is_null' but neither of these worked. Is the objective possible and how would I go about editing the code?
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
8 years 11 months ago #155177
by Krikor Boghossian
Replied by Krikor Boghossian on topic Display Disabled Item Navigation
Hello the checks to see if there is next/ previous arrow are these:
You can add an else: statement in order to print a disabled arrow.
Remember to use overrides instead of editing the core item.php file
getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates
<?php if(isset($this->item->previousLink)): ?>
<?php if(isset($this->item->nextLink)): ?>
You can add an else: statement in order to print a disabled arrow.
Remember to use overrides instead of editing the core item.php file
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.
- JxnGraphix
-
Topic Author
- Offline
- Junior Member
8 years 11 months ago #155196
by JxnGraphix
Replied by JxnGraphix on topic Display Disabled Item Navigation
Thanks! I was putting it in the wrong place :-/
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
8 years 11 months ago #155198
by Krikor Boghossian
Replied by Krikor Boghossian on topic Display Disabled Item Navigation
You 're welcome :)
Please Log in or Create an account to join the conversation.