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

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
urheat
Forum Members
Forum Members
Posts: 243
Joined: Sat Oct 17, 2009 6:50 am

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

Post 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 :)
Jean le Chauve

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

Post 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.
urheat
Forum Members
Forum Members
Posts: 243
Joined: Sat Oct 17, 2009 6:50 am

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

Post 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 3084 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 :)
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

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

Post 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...
urheat
Forum Members
Forum Members
Posts: 243
Joined: Sat Oct 17, 2009 6:50 am

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

Post 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?
uniqu3

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

Post 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)
urheat
Forum Members
Forum Members
Posts: 243
Joined: Sat Oct 17, 2009 6:50 am

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

Post 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.
urheat
Forum Members
Forum Members
Posts: 243
Joined: Sat Oct 17, 2009 6:50 am

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

Post 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/
User avatar
webform
Power Poster
Power Poster
Posts: 524
Joined: Sat Nov 25, 2006 3:39 pm

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

Post 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"}
Post Reply

Return to “Modules/Add-Ons”