[xwiki-users] Brainstorming XWiki Favorites
Guillaume Lerouge
guillaume at xwiki.com
Tue Jul 1 23:26:55 CEST 2008
>
> Ok so I can't count, that's three reasons.
That's the benefit of iterative designs, you've been able to correct
yourself in no time ;-)
> I created a Favorites class in XWiki with three properties, Name(string),
> Link(string) and Description(textarea).
>
> I create a sheet and template and attached the Favorites Object to the
> template.
>
> I then created a page with
>
> #set ($hql = ", BaseObject as obj where obj.name=doc.fullName
> and obj.className='XWiki.FavoritesClass' and
> obj.name<>'XWiki.FavoritesClassTemplate'")
> #set ($favs= $xwiki.searchDocuments($hql))
> #if ($favs.size() > 0)
> #foreach ($fav in $favs)
> * [${fav.Name}>{$fav.Link}]
> #end
> #else
> #info("There are no Favorites in this wiki!")
> #end
>
> and since I had not yet created the first Favorite it showed No Favorites
> in
> this wiki. Cool
Ok, I hadn't understood that those favorites were the same for all users, I
thought they would be user-specific, hence my previous remarks.
> Then I went back to the XWiki Favorites Class and created a new document
> and
> populated the Name Property, Link Property and Description properties and
> went back to the page with the search above...
>
> it shows the literal fav.Name in the name of the link and Link as the URI
> for the target.
>
> if $fav the FavoritesClass object? I am guessing not.
More information about the users
mailing list