Page 1 of 1

Next/prev -links not working if CGCalendar is in the sidebar

Posted: Sun Jul 22, 2012 8:03 am
by urheat
I've placed CGCalendar to the page template under the menu. If user clicks for example next month, the whole page loads and the content is replaced by the calendar. So now I have two calendars - one in the sidebar and one in the content area.

Here is an example how I would like it to work: http://tapahtumakalenteri.ouka.fi/cal/m ... ainEnd.rdo

User could navigate months and if user clicks date, then the content area is replaced by the info of that date.

Thanks in advance :)

Re: Next/prev -links not working if CGCalendar is in the sid

Posted: Sun Jul 22, 2012 8:26 am
by Jean le Chauve
Beter you create a page 'agenda' and put this tag in your template :
{cms_module module="CGCalendar" detailpage="agenda"}
Make the appropriates changements into the module parameters.

Re: Next/prev -links not working if CGCalendar is in the sid

Posted: Sun Jul 22, 2012 7:33 pm
by urheat
Jean le Chauve wrote:Beter you create a page 'agenda' and put this tag in your template :
{cms_module module="CGCalendar" detailpage="agenda"}
Make the appropriates changements into the module parameters.
Thanks Jean, but If I understood correctly, this doesn't solve my problem. Calendar works just great if it is used in a content area, but it would be more userfriendly, if user could see the calendar all the time, without navigating to specific calendar page.
template.gif
template.gif (17.57 KiB) Viewed 3090 times
Is it somehow possible, that user could see the calendar in the sidebar and navigate months. If user clicks a date, the events of that date would be shown in the content area.

Pretty basic function, but I don't know I've missed something, but I can't make this work :)

Re: Next/prev -links not working if CGCalendar is in the sid

Posted: Mon Jul 23, 2012 5:19 pm
by Dr.CSS
Some modules have an inline='(1 or true)' parameter, look in the modules Help, the only drawback is that while it may make the calendar stay in the sidebar when clicking thru the Months but clicking on an event may show it in the sidebar also...

Re: Next/prev -links not working if CGCalendar is in the sid

Posted: Wed Jul 25, 2012 10:34 am
by urheat
Dr.CSS wrote:Some modules have an inline='(1 or true)' parameter, look in the modules Help, the only drawback is that while it may make the calendar stay in the sidebar when clicking thru the Months but clicking on an event may show it in the sidebar also...
Thanks DR!

I tried:

{cms_module module="CGCalendar" detailpage="events" inline="1"}

...but it worked the way you descipted.

Any other ideas?

Re: Next/prev -links not working if CGCalendar is in the sid

Posted: Wed Jul 25, 2012 11:51 am
by uniqu3
If you are not using pretty url's (mod_rewrite) then you could theoretically override links within calendar template by using preg_replace or regex_replace or similar.
Basically you would need to replace values in generated links for returnid= and inline link is defined by 1 in url where it says default,1 or similar (not sure about that, no CGCalendar install at hand)

Re: Next/prev -links not working if CGCalendar is in the sid

Posted: Thu Jul 26, 2012 11:50 am
by urheat
uniqu3 wrote:If you are not using pretty url's (mod_rewrite) then you could theoretically override links within calendar template by using preg_replace or regex_replace or similar.
Basically you would need to replace values in generated links for returnid= and inline link is defined by 1 in url where it says default,1 or similar (not sure about that, no CGCalendar install at hand)
Thanks Uniqu3! Though this sounds a bit too hard for my skills ;)

Hopefully this function will be added in coming releases of CGCalendar.

Re: Next/prev -links not working if CGCalendar is in the sid

Posted: Fri Aug 31, 2012 9:52 am
by urheat
The problem isn't exactly solved but I managed to make a some kind of a workaround.

When user "hovers" the date, user can read the information of the date from the tool-tip. If editor wishes, a link to for information can be done.

The page is in finnish, but you can see the calendar on the right side of the page and try it.

http://tekija.info/

Re: Next/prev -links not working if CGCalendar is in the sid

Posted: Sat Oct 26, 2013 4:05 pm
by webform
uniqu3 wrote:If you are not using pretty url's (mod_rewrite) then you could theoretically override links within calendar template by using preg_replace or regex_replace or similar.
Basically you would need to replace values in generated links for returnid= and inline link is defined by 1 in url where it says default,1 or similar (not sure about that, no CGCalendar install at hand)
Old thread i know, but just to let you know the suggested solution works brilliantly ;D

Code: Select all

{$day.url|replace:"default,1":"default,0"}