Home › Forums › Calendar Products › Events Calendar PRO › Add venue to week view tooltip
- This topic has 6 replies, 2 voices, and was last updated 9 years, 10 months ago by Casey.
-
AuthorPosts
-
May 7, 2014 at 7:56 pm #153448cruzioParticipant
I’d like to add the venue location to the week tooltip. I see from the documentation that the file tooltip.php in /pro/week should be the one to edit? I’m not familiar with javascript templating so I’m wondering if I could get some assistance on whehter it’s possible and if so what code I would need to insert?
May 8, 2014 at 8:14 am #153870CaseyParticipantcruzio,
Thanks for getting in touch! If you look at ‘views/pro/week/single-event-hourly.php,’ you’ll see some extensive documentation on how to add additional fields to the Javascript template. Also, take a look at this reply, which is showing a user how to add the Organizer name to the tooltip templates.You should be able to use those examples and documentation as a good starting place to add the custom information you want, but let me know if you have further questions. Thanks! ๐
-Casey-
May 14, 2014 at 7:13 am #160661CaseyParticipantI just wanted to follow up and see if youโre all set here or if you still have further questions. Just let me know if you have further questions or if I should go ahead and close out this thread. Thanks! ๐
-Casey-
May 20, 2014 at 10:54 am #167758cruzioParticipantThanks for replying, and sorry for my delay. I attempted this but couldn’t get it to work. I used your reply from the thread you posted as a guideline. So, in single-event-hourly.php, I added:
<?php
$additional_values = array();
$additional_values[‘venue’] = tribe_get_venue($event_id);
?>And then in tooltip.php I added:
[[ if(venue.length) { ]]
Venue: [[=venue]]
[[ } ]]When I look at a tooltip, they don’t appear, and the console reports this error:
Uncaught TemplateError: ReferenceError: venue is not defined (on tribe_tmpl_tooltip line 19)Any idea where I went wrong?
May 21, 2014 at 5:39 am #168779CaseyParticipantDon’t forget to add the following to the ‘data-tribejson’ attribute:
<?php echo tribe_events_template_data( $post, $additional_values ); ?>
Take a look at my example here: https://gist.github.com/ckpicker/9936083
I think that should fix the issue for me, so give that a try and let me know! Thanks! ๐
-Casey-
June 6, 2014 at 6:21 am #208922CaseyParticipantI just wanted to follow up and see if youโre all set here or if you still have further questions. Just let me know if you have further questions or if I should go ahead and close out this thread. Thanks! ๐
-Casey-
June 24, 2014 at 12:08 pm #247876CaseyParticipantSince I havenโt heard back from you here, Iโm going to go ahead and close out this thread. Feel free to start a new thread if you have further issues. Thanks! ๐
-Casey-
-
AuthorPosts
- The topic ‘Add venue to week view tooltip’ is closed to new replies.