Jean Couteau wrote:
> Dear all,
> 
> i am playing with the calendar to do what i thought was quite simple, 
> but i am stuck. Some explanations :
> 
> I am trying to put the calendar table on my wiki home page, without the 
> event list or the add event form.
> 
> What i have done is :
> 
> - add a section between calendar and event list on XWiki.CalendarEvent
> - use code to retrieve only the first section of this document and 
> render it :
> 
> #set( $doc1=$xwiki.getDocument("XWiki.CalendarSheet").getDocument())
> #set ($content = $doc1.getContentOfSection(1))
> #set( $doc2=$xwiki.getDocument("Main.EventCalendar"))
> $xwiki.renderText($content, $doc2)
> 
> It's nice, i have my calendar table rendered, but no sign of my events.
> 
> I tried to change the $doc2 variable to see if it was a context problem 
> or something but nothing worked out.
> 
> Am i missing something ?

The calendar plugin does not work well with $xwiki.renderText, since it
uses a different way of getting the current document than the one used
by $xwiki.renderText.

TO fix this, edit XWiki.CalendarSheet and replace:

$cview.getHTMLCalendar($cparams, "")

with:

$cview.getHTMLCalendar($cparams, $doc, "")

-- 
Sergiu Dumitriu
http://purl.org/net/sergiu/
_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to