Hi Mike,
Hmmm, so why doesn't this work? I get results from the query, and build the
display. I want the panel where this resides to have
an UpIcon and a
DownIcon for all pages where the panel is displayed except when the panel
is
displayed on the current page where I want both the UpIcon and DownIcon the
same as the DownIcon.
Currently the if statement always evaluates false.
#set ($hql = ", BaseObject as obj,
LongProperty prop
where obj.name=doc.fullName and obj.className='XWiki.ToolbarClass' and
obj.name<>'XWiki.ToolbarClassTemplate' and
obj.id=prop.id.id and prop.id.name='Order'
order by prop.value")
#set ($toolbars= $xwiki.searchDocuments($hql))
#if ($toolbars.size() > 0)
#foreach ($toolbar in $toolbars)
#set ($itemdoc = $xwiki.getDocument($toolbar))
#set ($itemobject = $itemdoc.getObject('XWiki.ToolbarClass'))
#if($doc.fullName == $itemdoc.fullName )
#set ($imgsrc0 =
$xwiki.getAttachmentURL("$itemdoc","$itemdoc.display('DownIcon')"))
#set ($imgsrc1 =
$xwiki.getAttachmentURL("$itemdoc","$itemdoc.display('DownIcon')"))
#else
#set ($imgsrc0 =
$xwiki.getAttachmentURL("$itemdoc","$itemdoc.display('UpIcon')"))
#set ($imgsrc1 =
$xwiki.getAttachmentURL("$itemdoc","$itemdoc.display('DownIcon')"))
#end
...
There's 2 #if and only 1 #end in your code, is it closed at a later stage ?
Guillaume