I am making good progress on a new Class that has properties, style sheet and
template that I created after following the Todo Tutorial.

The ToolbarClass has the following properties

Type/Name/SampleContent

String/Title/Advanced Editor
TextArea/Description/This button takes you to the advanced editor page
String/UpIcon/AEBtn0.jpg
String/DownIcon/AEBtn1.jpg
String/DisabledIcon/AEBtn2.jpt
String/GotoPage/Tools.AdvancedEditor

Also following the Todo Tutorial I created the Toolbar Space Web Home page
dashboard with 


#set ($hql = ", BaseObject as obj where obj.name=doc.fullName
        and obj.className='XWiki.ToolbarClass' and
obj.name<>'XWiki.ToolbarClassTemplate'")
#set ($toolbars= $xwiki.searchDocuments($hql))
#if ($toolbars.size() > 0)
  #foreach ($toolbar in $toolbars)

* [$toolbar]

#end
#else
  #info("There are no Toolbar documents in this wiki!")
#end

And I added the Comments object to the ToolbarClassTemplate
and then added a couple of document and attached the UPIcon and DownIcon
images as attachments.

Going to the Web Home of the I see the list of the two document with the
ToolbarClass object on them so cool beans just as the tutorial instructed
with the names changed and bingo we have a winner.

Now the tricky part, I want to show the attached images in the dashboard for
each document, where the property of the Toolbar object for UpIcon is used
to identifiy which attachment to display.

I tried 


#set ($hql = ", BaseObject as obj where obj.name=doc.fullName
        and obj.className='XWiki.ToolbarClass' and
obj.name<>'XWiki.ToolbarClassTemplate'")
#set ($toolbars= $xwiki.searchDocuments($hql))
#if ($toolbars.size() > 0)
  #foreach ($toolbar in $toolbars)

*  $xwiki.getAttachmentURL(  [$toolbar]

#end
#else
  #info("There are no Toolbar documents in this wiki!")
#end
 
where I know that AEBtn0.jpg is the attached image but that doesn't show.  

Eventually I want to use the string in the UpIcon property to identify the
image to display but unless I can get the attachement to display on another
page I cannot proceed.


-- 
View this message in context: 
http://www.nabble.com/Creating-a-Toolbar-of-my-own-tp17410485p17410485.html
Sent from the XWiki- Users mailing list archive at Nabble.com.

_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to