Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Search

 
Advanced search

8043 Posts in 1856 Topics- by 2099 Members - Latest Member: roi
Calendar Script CommunityCustomizationCustomizing CalendarScript (Moderators: scott, DanO, Marty)different templates same calendar
Pages: [1]   Go Down
Print
Author Topic: different templates same calendar  (Read 249 times)
0 Members and 1 Guest are viewing this topic.
Rick
Guest
« on: September 27, 2004, 03:57:00 PM »

I am trying to set up a single calendar that can can be viewed differently on different pages i.e a small version of two weeks on the home page and a full month version on a specific diary page. I have tried doing this by inserting an include such as <!--#include virtual="calendar.cgi?calendar=default"--> on one shtml page and another page with <!--#include virtual="calendar.cgi?calendar=small"--> however, all I get is a page saying No Events ..View Calendar. when I click view calendar I get the calendar with the default template. when I use the second include I just get a blank page (even if I have created a folder called "small" which is a direct copy of the default template folder). I hope this makes sense

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

Please don't PM me. Post in the open forum.


WWW
« Reply #1 on: September 27, 2004, 05:49:00 PM »

** I am trying to set up a single calendar **

** <!--#include virtual="calendar.cgi?calendar=default"-->  **
** <!--#include virtual="calendar.cgi?calendar=small"-->  **

Each SSI tag above is calling a different calendar, one with a key as "default" and one with a key as "small". I assume you don't have a calendar actually set up with a key of "small" which is likely why you're getting a blank page.

A single calendar can only have defined one set of templates for it at a time. You can however display the calendar on any template from that set. Eg. One page displaying the events on ssi.html and the other page displaying them on ssi-2.html (once you make it)... provided your server recognizes the 'include virtual' SSI tag so you can pass the template file name.

If you want to use different templates with SSI calls, than you must add the template reference to the SSI tags. Eg.

<!--#include virtual="calendar.cgi?template=Template_File_Name_Here.html"-->  

BTW. You'll likely have to pass the rest of the SSI template variables as well as shown in my second reply in the previous forum message "SSI head ache". The calendar=... parameter is not needed if just calling the default calendar.

That message and other useful ones can be found linked from the Unofficial CalendarScript - Mods and Plugins site in the Links section.

Dan O.

[This message has been edited by DanO (edited September 27, 2004).]

Logged
Pages: [1]   Go Up
Print
Jump to: