template tags in custom page templates

Home Forums Calendar Products Events Calendar PRO template tags in custom page templates

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #17352
    Jason Lovoy
    Participant

    I’m trying to basically mimic the standard calendar grid view on a custom page template, where I specifiy the calendar to a single category. So it appears I have two problems:
    1) showing a grid calendar by category (I swore I could do this but can’t find the proper funciton / parameter).
    2) All of the functions for month view, list view, upcoming, etc that are used don’t understand that the calendar is in a custom page template, and keep going back to the default base url.

    So what I want to achieve is a grid calendar with the same options for viewing as the default base url, where the events are limited to one category, and the supplementary viewing options do not redirect to the base slugs, but stay w/ the path of the custom template intact. If there is a way to do this, I’d be greatly appreciative of your help. Thanks.

    #17389
    Rob
    Member

    Hey John. Thanks for reaching out. First and foremost: have you consulted our template tag documentation (available at https://theeventscalendar.com/support/documentation ), to see if that gives you what you need? It sounds like it has what could point you in the right direction.

    Let me know if not, and I’ll see what else the team can offer up on our end. Thanks!

    #17397
    Jason Lovoy
    Participant

    Yes, I did. I also checked the source of the plugin itself. The inherent problem is that TEC likes to hijack a url, rather than adopt one. By that, I mean when you go to settings and set a base url, like “events” and “event” for singular, whenever you take an action with any TEC function (like the upcoming events function, or by month dropdown function) it does this with the base url, even when a template tag has been used in a custom template, such as I was attempting.

    What would be highly preferable is for these functions to detect where they are being used and adopt to the current location, so that if a the calendar grid, for instance, is being used in the url “/around-town/calendar” (a custom page w/ template tags rather than the base url in settings) the upcoming events template tag would return as “/around-town/calendar/upcoming” rather than jumping to the default “/events/upcoming” which makes the use of template tags in page templates pointless to begin with.

    I’ve expressed these concerns w/ Joey Kudish before (to a degree), so I’ll reference him to this thread, but that’s the basis of my issue.

    In the meantime, I finally found (because some of these things aren’t yet documented well) the url for the full calendar grid by category at “/base-url/category/my-category” and used a redirect from my page where I wanted it to be (for site hierarchy purposes) along with some conditionals to make my sidebar logic, etc., work. However, I’d love for there to be a better method.

    #17407
    Jonah
    Participant

    Hi John, this is a bit outside my league so I’m going to bring Joey in here to comment. Stay tuned.

    #17415
    Rob
    Member

    Hey John. Thanks for the follow-up; I spoke with Joey about this a moment ago and he is familiar with your goal / the discussion you’ve been having so far, so I’ll let him take point on this thread. He’ll take a look and respond later this afternoon at some point.

    #17459
    Joey Kudish
    Member

    Hey John,

    Can you explain a little better what is exactly that you’re trying to do, and more importantly, if you can share the code for what you’ve done thus far, that would allow me to see how we can be of further help. I did play around with a few of our template tags just now and had them in a custom page template and it was working mostly right as far as I could tell…

    Cheers
    Joey

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘template tags in custom page templates’ is closed to new replies.