Hi Oana

Thanks for the reply, as the code you provided almost worked except in the


I had to change "nb" to "object" because I realised that when going through
Edit>Objects and directly editing entry 1, the URL had "object=1" at the end
whereas nb was still returning entry 0. I notice on my 2.4 calendar that the
URL ends in "nb=1" so that must be where the problem lies.

Thanks Again,

Complete fix:

#foreach($event in $doc.getObjects("XWiki.CalendarEvent"))

1.1.1 $event.title.replaceAll('\n', "")
#if($hasedit) ( $doc.getURL( $msg.get("edit") ,
$doc.getURL( $msg.get("delete") )#end 

Elena-Oana Tabaranu wrote:
> Hi,
> Your code should look like this:
> #foreach($event in $doc.getObjects("XWiki.CalendarEvent"))

> 1.1.1 $event.title.replaceAll('\n', "") 
> #if($hasedit) ( $doc.getURL( $msg.get("edit") , 
>  $doc.getURL( $msg.get("delete") )#end
> ...
> #end
> You can make a test and print the ${event.number} inside the #foreach to 
> see if the value is correct. I have tested with 3.0 and the links seem ok.
> Oana

View this message in context: 
Sent from the XWiki- Users mailing list archive at Nabble.com.
users mailing list

Reply via email to