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 ... Mike Oliver wrote:
Bingo we have a winner, yes that's what I was looking for.
Sergiu Dumitriu-2 wrote:
Guillaume Lerouge wrote:
#if($doc.name = "SpaceName.PageName")<Some graphics here>
You meant #if($doc.fullName == "SpaceName.PageName"), right?
#else <Some other graphics here> #end
Is that what you would need ?
Guillaume
On Sun, May 25, 2008 at 5:57 PM, Vincent Massol <[email protected]> wrote:
On May 25, 2008, at 4:16 PM, Mike Oliver wrote:
Is there a way that a panel can be aware of the current page context so I can enable and disable graphics based on which page is currently active? $doc?
-- Sergiu Dumitriu http://purl.org/net/sergiu/ _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- View this message in context: http://www.nabble.com/Panel-aware-of-page-tp17458341p17474647.html Sent from the XWiki- Users mailing list archive at Nabble.com.