Home › Forums › Calendar Products › Events Calendar PRO › Single Event Previous/Next Navigation
- This topic has 6 replies, 2 voices, and was last updated 12 years, 10 months ago by
Barry.
-
AuthorPosts
-
June 8, 2013 at 8:30 am #50857
Michael
ParticipantHi, I’d like to display a separator between the previous event link and the next event link.
The easiest way to do this is probably to check if a previous AND a next event exist – if yes, echo a slash. Simple. Can somebody point me in the right direction?
ThanksJune 8, 2013 at 8:34 am #50859Michael
ParticipantOh – and I forgot: similarly, is there a way to exclude events that have passed, ie to only display a previous event link if the previous event is an upcoming event?
June 10, 2013 at 3:04 pm #50986Barry
MemberHi Michael.
Regarding your first question you could try following the instructions in this snippet – and please familiarize yourself with our Themer’s Guide (link over on the right under Useful Resources) first of all, if you are unfamiliar with customizing The Events Calendar 🙂
Similarly, is there a way to exclude events that have passed, ie to only display a previous event link if the previous event is an upcoming event?
So that would be a littel more involved and I’d have to leave it to you to find a solution – you might find snippets for this or something similar to this on the forum or else you would need to look at the plugin’s code and adapt it to meet your own needs.
Good luck!
June 12, 2013 at 4:57 am #51134Michael
ParticipantThanks, but the code in the snippet only checks for the existence of a previous event, so on the last event, it displays:
PREVIOUS |As stated above, how do I check if there’s a previous AND a next event?
(I’ve been through the Themer’s Guide. I also searched the forums before posting.)On a related note, the prev/next navigation seems to choke on recurring events: if there’s another event between the first and second occurence of a recurring event, it jumps back to the first occurence, instead of the second. Is this a known issue?
Thanks
June 12, 2013 at 5:58 am #51139Barry
MemberThanks, but the code in the snippet only checks for the existence of a previous event, so on the last event, it displays:
PREVIOUS |Right, it’s just a starting point 🙂
You could extend it and check if the next event is empty, too, then roll that into the logic for displaying or not displaying the pipe symbol or whatever separator you want to use.
On a related note, the prev/next navigation seems to choke on recurring events: if there’s another event between the first and second occurence of a recurring event, it jumps back to the first occurence, instead of the second. Is this a known issue?
It’s not an issue I know of but it’s quite possible – to avoid confusion can you create a new thread and provide instructions to help us see the problem on your site?
Thanks!
June 12, 2013 at 6:28 am #51152Michael
ParticipantGeddit. I wasn’t familiar with output buffers, but I eventually got the syntax right.
June 12, 2013 at 6:35 am #51153Barry
MemberExcellent 🙂
-
AuthorPosts
- The topic ‘Single Event Previous/Next Navigation’ is closed to new replies.
