Devs,
How is the TagClass used?
Does a page contain one object of this class for every Tag that is added to
the page/document.
or
Do, all the tags belong to the same "tags" field of one object.
I tried adding 2 tags (separated by a | ) and then used rthe following code,
it does not seem to work. Please guide:
#set($assetDoc = $xwiki.getDocument($asset))
#set($tagObject=$assetDoc.getObject("XWiki.TagClass"))
#set($tags = $tagObject.get("tags"))
#set($tagList = $tags.split("|")) or #set($tagList =
$tags.toString().split("|")) (even getName() does not work)
#foreach ($tag in $tagList)
#if($tag == "XYZ") ( #if($tag.equals("XYZ")) also does not
work
but when I had only one tag in the tags field, I just used :
#if( $tagObject.get("tags") == "XYZ")
and this worked....
Please help - one tag per object or multiple tags per object?
Thanks
Show replies by date