[Typo3-dev] advCalendar plugin in template

Jan-Erik Revsbech jer at moccompany.com
Wed Jul 21 22:19:17 CEST 2004


----- Original Message ----- 
From: "David Lanier" <david at joppacode.com>
To: <typo3-dev at lists.netfielders.de>
Sent: Wednesday, July 21, 2004 8:46 PM
Subject: [Typo3-dev] advCalendar plugin in template


> I'll start off with the quick question, then follow up with the details.
>
> When using the advCalendar plugin in a template, how do you control its
> starting point?
>
> Here are the details:
> What I've started off with is pretty simple.  These are all in standard
> templates.  I set some basic options for all advCalendars like this:
>
> plugin.tx_advCalendar_pi1 {
>   defaultDisplay = 1
>   fe_adminLib.create.anonymousAllowed = 0
>   fe_adminLib.create.allowedGroups = 2
>   displayMonth.displayEvents = 1
>   displayMonth.listEventsAtBottom = 1
>   displayEvent.addMonthView = 2
> }
>
> Then I add it to a custom object, to be inserted into my template later
on.
>
> myvars.calendar_bare = COA
> myvars.calendar_bare.1 < plugin.tx_advCalendar_pi1
> myvars.calendar_bare.1 {
>   templateFile = fileadmin/extension_templates/advcalendar_bare.html
> }
>
> It shows up on every page, which is exactly what I want.  The problem is
> that it only shows calendar items for the page that is displaying it.  I'm
> having a heck of a time trying to point it at any other page.  So, what I
> really need to do is add something to the above code that tells the
> advCalendar to look at a specific page for calendar events.
>
> Does anyone know what value I should set?
>
> Here's everything I've tried so far:
> pid_list = 1,4     (those are two pages I want to pull calendar data from)
> pid_list.field = parent
> pid_list.field = root
> pages = 1
> pages = 1,4
> data.pages = 1
> data.pages = 1,4
> startingpoint = 1
> recursive = 1
>
> (don't worry, I didn't try them all at the same time.)
>
> I looked at the Setup values of its Static Typoscript Code, and saw
> pid_list.field=pages, so I guessed that might be what I'm looking for, but
> I'm not sure.
>
> What is the meaning of the .field attribute, and where can I find a list
of
> acceptable values for it?
>
The .field =pages attribute means that the value of the pages field in the
content table is used. This is the field that is usually called
startingpoint when you insert a plugin on a page as a content object.

Try this:

myvars.calendar_bare.1 {
  pid_list >
  pid_list =1,4
}

The fírst line make sure that there is no .field .data or other parameteres.
If you do not write this, then the the function stdWrap (very good
documentation is found in TSref) will override the value  1,4  with the
value from the pages field which is empty (since it is not inserted a a
content object, but directly with typoscript).


> I do see that it comes from the $cObj->data array, but I'm not sure what's
> in that array or how to add values to it, or if I should.

As mentioned look in TSref documentation on typo3.org, especialle the
stdWrap function.
>
> Thanks in advance,
> -david
>

Hope the answer is not to cryptic.

/Jan-Erik

>
>
> _______________________________________________
> Typo3-dev mailing list
> Typo3-dev at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev
>







More information about the TYPO3-dev mailing list