Add venue to week view tooltip

Home Forums Calendar Products Events Calendar PRO Add venue to week view tooltip

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #153448
    cruzio
    Participant

    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?

    #153870
    Casey
    Participant

    cruzio,
    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-

    #160661
    Casey
    Participant

    I 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-

    #167758
    cruzio
    Participant

    Thanks 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?

    #168779
    Casey
    Participant

    Don’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-

    #208922
    Casey
    Participant

    I 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-

    #247876
    Casey
    Participant

    Since 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-

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Add venue to week view tooltip’ is closed to new replies.