"Today" link

Home Forums Calendar Products Events Calendar PRO "Today" link

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #63088
    Daniel Veaner
    Participant

    I am making a few additions to the template on my site, particularly in Month view. In my copy of nav.php I want to insert a “Today” link in between the previous and next months. Is there a call like “tribe_events_the_previous_month_link();” that I could use to make the calendar display the current month (or today’s date)? I can see where to insert it in nav.php, but not what to insert. How do I make a link that says “Today” or “This Month” and goes back to the current month when it is clicked?

    Thanks!

    #63333
    Barry
    Member

    Hi dveaner, would tribe_get_day_link() be useful for you here?

    #63345
    Daniel Veaner
    Participant

    Barry,
    Thanks for this! It does get me the correct URL, but when I click the link I made with it, the calendar hangs on the turning gear. Because the site is live I can’t leave the link there for you to see, but here is a screenshot of what it looks like plus the code I used to make the link (since I am not sure what html will do in a post on this forum): http://ithacalendar.com/ithacalendar-hanging.png

    Again, I have this code in my template copy of /month/nav.php.

    I tried creating the link two ways. One of them was just the simple a href= link and the other included target=_top — both approaches result in hanging on the gear.

    If I mouse over my “Today” link, right click and tell it to open the link in a new browser tab or window it happily opens to the correct page with the right date showing, in this case: http://www.ithacalendar.com/events/2013-09/

    So my question is, is there a special way links have to be laid out to work correctly within the calendar template?

    I noticed in the page source when looking at my site that the link code for the next and prev links have extra arguments including data-month=yyyy-mm and rel=pref
    Would adding them fix this? And the reason I am asking instead of just trying it is: what tribe function gets me the data-month?
    Thanks!

    #63359
    Barry
    Member

    Some functions such as tribe_events_the_previous_month_link() add data-month and rel attributes (and it’s quite possible you need to add these to your link, best thing to do would be test the theory out with a manually crafted link first of all) – for what you’re trying to do here though you would probably need to do a little manipulation of your own to do this dynamically.

    This is however very much in customization territory so we can’t really provide much more help – for which reason I’ll now close this thread – but we do wish you luck – it’s great to see interesting things being built with The Events Calendar 🙂

    #980431
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘"Today" link’ is closed to new replies.