Page 1 of 1

Calendar event to be displayed on separate page template

Posted: Thu Mar 01, 2007 7:52 am
by Darwin Web Design
Hi
I'm using CMS Lanai with Calendar 0.7.8.

I am using upcoming list to display a number of upcoming events on my home page (which is quite busy with lots of content) - when you click 'more' for the details, the page stays the same (ie home page) with all of the calendar info sitting at the top of the page.  Is it possible to create a landing page for all of the event details so the usual home page guff isn't appearing on the details page?

Also, how can I get global content blocks to work in the calendar details?  I have standard event booking paragraph and some training course addresses which would be handy to have as content blocks rather than copying and pasting over to each event (problem if address changes).

thanks
:-\

Re: Calendar event to be displayed on separate page template

Posted: Thu Mar 01, 2007 1:32 pm
by heatherfeuer
Under content --> calendar, there are several tabs for the different templates used by the calendar module.  Click on the "Event Template" tab to show the template.  What I did was to copy all that code into my favorite editor to make any changes I wanted to achieve the look I wanted (ie. line breaks and changing the date display).  In that template, towards the bottom where the code for the details is, edit the template to include your content blocks.  I'm not sure if it's a bug or what, but the only way I could get the Event Detail page to format correctly was to save my event template as a new template in the layout section and apply it to the event detail page I created.

Next, on the page where you have the smarty tag for the upcoming event list, add to the smarty tag "detailpage=[page_alias]".  Then create a new page, make it active but not shown in the menu and make the title something like "Event Information." You might need a non-breaking space or a simple
in the content area to prevent an error message about no content.  Under the options tab, give it a page alias, and assign the event template to the page.

Now when you click on "more" it should open up the new Event Information page with the event details on it.

Re: Calendar event to be displayed on separate page template

Posted: Thu Mar 01, 2007 2:55 pm
by chead
If all the events from your calendar will use the same global content blocks for the booking details, address, etc., then you can simply add the {global_content name="___"} tags to the detailpage template heatherfeuer described.

If different events would need to use different global content blocks, there will be a bit more to it, but it should be doable depending on how your events are set up (how you're using titles, categories, etc.).

Re: Calendar event to be displayed on separate page template

Posted: Sun Mar 04, 2007 11:54 pm
by Darwin Web Design
Hello and thank you so much.

heatherfeuer, I was doing the stuff already in your first paragraph but your hint in the second paragraph answered on of my questions perfectly, thank you.  for example ... the actual complete calendar code in my case now reads:

{cms_module module='Calendar' display="upcominglist" limit="5" category="Workshops" detailpage="calendarworkshops"}

Regarding the global content, unfortunately chead - I am not a programmer so I might have to resort to copying and pasting the event locations etc because there are many venues so changing the one central template won't do the trick.  Thanks anyway.

Regards
;D

Re: Calendar event to be displayed on separate page template

Posted: Sat Apr 07, 2007 11:40 am
by petani
I have also have the problem with the event details not showing on a different page

My calendar code is:
{cms_module module="Calendar" display="upcominglist" table_id="cal-upcominglist" lang="da_DK" detailpage="Events"}
and I am using Calendar module version 0.7.8 and CMSMS 1.0.4

heatherfeuer writes that you must "... assign the event template to the page" but how do you do that?

I have made a new template as a copy of the Events template from the Calendar module and then assigned that template to the Events page but that is not working.

Any one with an idea how to make this work?

Thanks in advance
Peter

Re: Calendar event to be displayed on separate page template

Posted: Sat Apr 07, 2007 12:02 pm
by heatherfeuer
What I did was to create a page with the title "Event Information" and a page alias (under the options tab) called "event-detail."  In the content area of that page I put the following module call:

{cms_module module='Calendar' table_id='cal-event'  detail='1'}

Under the options tab I also unchecked the option "show in menu."  The only time this page displays is when a user clicks on an event shown in the calendar or the upcoming list of events.

Re: Calendar event to be displayed on separate page template

Posted: Sat Apr 07, 2007 12:58 pm
by petani
So simple!

Thanks

Peter