Support

Home Forums Event Espresso Premium 'Back to calendar' button for different categories

'Back to calendar' button for different categories

Posted: July 19, 2013 at 5:23 am

Viewing 2 reply threads


Aaron Davies

July 19, 2013 at 5:23 am

Hi there,

I want to include a Back to Programme button on the event registration page and I can see that it’s possible to add it in registration_page_display.php file in event-espress plugin’s templates folder.

But the issue is that I want different URLs for different categories.

For example, we have 2 event days at the moment: http://www.rcmconference.org.uk/day-1/ and http://www.rcmconference.org.uk/day-2/

So we need a back to programme button on each of those events registration pages which links back to the respective day calendar.

How can I do this?

Cheers


Dean

July 19, 2013 at 5:55 am

Use a basic if statement in the registration_page_display.php file, using the category_id (not the identifier, the actual ID)

<?php

$myeventcat = $event->category_id;

if ($myeventcat == 1) { echo '<a href="http://www.yoursite.com/page-name/">Go back</a>'; }
if ($myeventcat == 2) { echo '<a href="http://www.yoursite.com/page-name">Go back</a>'; };

?>

if you do

<?php var_dump($event); ?>

you will get access to all the available information in that variable if you need to do further work.


Aaron Davies

July 23, 2013 at 8:26 am

Thanks Dean.

Worked like a charm. 🙂

Viewing 2 reply threads

The support post ‘'Back to calendar' button for different categories’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso