Separate page layout for gridview vs. single event listing

Home Forums Calendar Products Events Calendar PRO Separate page layout for gridview vs. single event listing

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #24459

    Hi, I am trying to set up a website using Headway with TEC as the major feature of the site. Right now, I’ve developed a page layout that works well with the gridview. However, I need a different page layout for the single event listings. This is possible using Headway because I can create different layouts for the front page, blog index, individual pages and posts, etc.

    I created the layout that I want for the event calendar and saved it as the layout for the “Events” page. However, when I changed the layout for the blog index – where I believe the single event posts will be displayed, it changed the layout of the gridview to match.

    Is it possible to edit the plug-in files so that the gridview uses the page layout I select? Any help with this would be much appreciated. I’m not sure what additional info might be needed to help me. I’m pretty handy at figuring things out with a google search and poking around in the code a bit, but need to be pointed in the right direction.

    Thanks,
    Beth

    #24484
    Barry
    Member

    Hi Beth, Barry from the support team here – thanks for contacting us.

    Unfortunately I don’t have any experience of Headway and so it’s difficult for me to visualize the problem. What I’ll do is ask around the team and see if anyone else has experience of that theme – could be what we need here is a someone who is equally expert with Headway and The Events Calendar.

    Thanks for your patience!

    #24486

    Thanks Barry. I’m probably not explaining it well. Basically, I need a different page layout for one page (the page that displays the grid calendar) and another page layout for the “posts”, i.e. the event details pages. I bet there’s a relatively easy way to do this with either the template tags or some custom code within the ECP plug-in files, but I need some help getting there.
    Any suggestions are much appreciated!

    #24489
    Barry
    Member

    Sure – well possibly I was jumping the gun and assuming that Headway has some sort of atypical structure – some theme frameworks are fairly unique after all – but in principal you should be able to do this by editing ecp-page-template.php (which dictates the layout for the grid and list views and your ecp-single-template.php which provides the layout for single events.

    Our Themer’s Guide has more info on this sort of thing, particularly the section on Template Views.

    Hope that helps – and please don’t hesitate to shout back if you need further guidance 🙂

    #24607

    Hi Barry,

    Thanks for the response. I’ve read the themer’s guide and used it to make some customizations to my community events form. I’m more of a hacker than a true developer, but so far I’ve been able to do what I need using the documentation that has already been provided. However, while I think I know WHERE the customization needs to happen, I don’t know what parts of the code to mess with. Maybe I can explain again what I want to do and see if you can point me in the right direction more specifically.

    Right now, I want my gridview to use the page layout as seen here: http://kidscalendar.wpengine.com/events/
    I’ve used Headway to create the page layout with the widget areas above the calendar.

    However, I need the event listings page to have a more traditional layout like this:
    http://www.lawrencekids.net/event/jubilee-music-class-at-lol/2012-09-06/

    Please note that these are two completely different websites. I’m using the links to show what I want to accomplish.

    One idea I have would be to hard code the gridview template to show the widget areas that I want so that the plug-in could just use the page template I want for the individual event listings. Is that possible?

    Is there another way to get ECP to utilize different layout templates for the grid vs. single event listings? I’m open to any ideas and really don’t mind messing with the code and/or learning something new to make this happen.

    Thanks again,
    Beth

    #24615
    Barry
    Member

    Yes: so there are two different templates I think you will be interested in here. One is ecp-page-template.php and the month or grid view, as well as the upcoming events list, are served up using that template.

    The second is ecp-single-template.php and an individual event listing is contained within that.

    If your theme is called “my-theme” then both of those templates, if you choose to use them, should be located like so:

    wp-content/themes/my-theme/events/ecp-page-template.php
    wp-content/themes/my-theme/events/ecp-single-template.php

    If these files don’t exist within your theme then The Events Calendar will use its default templates which can be found in:

    wp-content/plugins/the-events-calendar/views

    You can also use those default templates as a starting point for your custom templates. Does that explain things any better?

    #24886
    Barry
    Member

    Hi Beth – how are you getting on here? Did you get things fixed up how you want them?

    #25060
    Kishore Hari
    Participant

    I had the same question – how do I have the calendar grid and list view use a different template (in my case, one with no sidebar) and than the single event detail (one with my standard WP sidebar)? I only see the option to select a default template in the template section under Events–>Settings.

    #25087
    Barry
    Member

    Hi Kishore, that’s a slightly more involved process. First of all please read over my above posts and also the Themer’s Guide (if you haven’t already done so) as you will need a good understanding of the basics first of all.

    One way that I might tackle this is to create a custom ecp-page-template.php. I would also create two additional templates, each providing a different layout. Some code can then be added to your custom ecp-page-template.php to load whichever of these is the most appropriate choice:

    http://pastebin.com/TuyXpg5M

    There are actually a ton of different ways you might handle this – for instance you could also wrap up the get_sidebar() call in a conditional statement that checks to see if the current request is for the grid view or not – so there is no right or wrong way to approach this but you should certainly stick to techniques and ideas you are comfortable with.

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Separate page layout for gridview vs. single event listing’ is closed to new replies.