Page 1 of 1

CGCalendar question... displaying the event

Posted: Wed Jan 12, 2011 4:14 am
by fearmydesign
Hello everyone, is there a way for this CGCalendar to open a new small window showing the Event details instead of showing the event on the same page below the calendar? So basically when you click on any event, a window pops up showing all the details for it.

Or maybe someone has customize it to do this, maybe they can share how they did it. Thank you in advance

Regards,

Re: CGCalendar question... displaying the event

Posted: Wed Jan 12, 2011 4:40 am
by calguy1000
Simple stuff.

a: Modify the calendar template to i) give a class to the href associated with the event url, and ii) add a showtemplate=false parameter

Code: Select all

{foreach from=$day.events item=event}
<li><a class="calendar_event" href="{$event.url}?showtemplate=false">{$event.event_title}</a></li>
{/foreach}
b: install the JQueryTools module and make sure it is called in the page template, or the page specific metadata.

Code: Select all

{JQueryTools action='incjs'}
c: Setup Fancybox to handle links with the class you specified above:

Code: Select all

<__script__ type="text/javascript">
{literal}
jQuery(document).ready(function(){
  jQuery('a.calendar_event').fancybox();
});
{/literal}
</__script>

Re: CGCalendar question... displaying the event

Posted: Wed Jan 12, 2011 5:04 am
by fearmydesign
Simple stuff.
Thank you Calguy, it works but it will not display the data for some reason. The box pops up but it says: The requested content cannot be loaded.
Please try again later.


You can see it here http://www.courtsidesportsbar.com/cms/i ... e=calendar

Any idea why? :-\

Re: CGCalendar question... displaying the event

Posted: Thu Jan 13, 2011 5:23 am
by fearmydesign
Hi, is there anyone that can help me on this? Calguys code and instructions worked perfectly, but for some reason the events don't show up on the pop-up window...

Regards,

Re: CGCalendar question... displaying the event

Posted: Tue Mar 01, 2011 2:52 pm
by fearmydesign
I saw this thread and thought I would like to use this as well. I have it working after finding a typo in the script.

Instead of ?showtemplate=false if should be &showtemplate=false.
Thanks for posting this Paul!