I basically have an "FAQ Application" created similar to the application
demo on the web site.
I have tagged my FAQ entries with tags, and I can
use the tag cloud to filter items in the livetable display.
Now I'd like to add a column which holds the list of tags for each
FAQ document.
In the livetable examples, I can see example columns like
"doc.date", but I don't think there is a "doc.tags".
So I think I want to know:
How do I put an arbitrary expression in a livetable?
How do I write an arbitrary expression in velocity
that access
the Java API that I found for tags?
Are those the questions I should be asking? :-)
--chris
On Wednesday November 16, at 2:28PM, Ludovic Dubost wrote:
> What do you mean by translating this into a livetable context ?
> What do you want to achieve ?
>
> Ludovic
>
> 2011/11/16 Chris Quenelle <chris(a)quenelle.org>
>
>>
>> The "tag page" doesn't have an example of getting the list of tags
>> from a document.
>>
>> I found this in the API document:
>>
>> public List<String> getTagsFromDocument(String documentName) throws
>> XWikiException
>>
>> Can anyone suggest how to translate this into a livetable/velocity context?
>> Here's my code:
>>
>> {{velocity}}
>> #set($columns = ["Task", "Recipe"])
>> #set($columnsProperties = {
>> "Task" : { "type" : "text", "link" :
"view", "html" : "true",
>> "sortable":true },
>> "Recipe" : { "type" : "text", "link" :
"view", "html" : "true",
>> "sortable":true }
>> })
>> #set($options = {
>> "className":"AdminFAQ.FAQClass",
>> "translationPrefix" : "faq.",
>> "tagCloud" : true,
>> "rowCount": 10,
>> "tags": "true"
>> })
>> #livetable("faq" $columns $columnsProperties $options)
>> {{/velocity}}
>>
>>
>>
>>
>>
>>
>> On Wednesday November 16, at 12:14PM, Vincent Massol wrote:
>>
>>> Hi Chris,
>>>
>>> On Nov 16, 2011, at 8:23 PM, Chris Quenelle wrote:
>>>
>>>> In velocity, what is the way to get the list of tags for a given
>> document?
>>>> I could look at the code which implements my current skin, because it
>> shows tags,
>>>> but I don't know where that is.
>>>
>>> Add a tag in your wiki on a page
>>> Click on the tag in the tagcloud on the home page
>>> Edit the page to see what it does :)
>>>
>>> For ex:
>>>
http://localhost:8080/xwiki/bin/view/Main/Tags?do=viewTag&tag=test
>>>
>>> You'll see there's a Tag Plugin:
>>>
http://extensions.xwiki.org/xwiki/bin/view/Extension/Tag+Plugin
>>>
>>> Hope it helps,
>>> -Vincent
>>>
>>>> I found these pages, but they didn't help:
>>>>
http://www.xwiki.org/xwiki/bin/view/Main/Tags
>>>>
http://extensions.xwiki.org/xwiki/bin/view/Extension/Tag+Application
>>>>
>>>> I have a livetable showing documents, and I want to show the tags for
>> the document
>>>> as a table column.
>>>>
>>>> --chris