Dear,
I would like to generate an article store and filter by their tags.
I do not see into the AWM field palette
an item to select one or multiple tags.
here the application screenshot with my try using the database field
Thanks
Dear,
I would like to generate an article store and filter by their tags.
I do not see into the AWM field palette
an item to select one or multiple tags.
here the application screenshot with my try using the database field
Thanks
Tags are a standard feature of wiki pages. Your application entries (the pages you create with your application) are also wiki pages so you will be able to tag your articles like any other wiki page. So I don’t understand why you want to include / duplicate this in the application structure.
Thanks @mflorea for your help indeed I think my needs is not well explained.
I would like create a book store application and flag each book by a tag (the one provided by xwiki as standard feature)
Like this I can to create multiple category pages which will be get from the book store the books and filter them by the tags requested using livetable.
As example, I have a book store with these entries
I have a category page named something
with the tag bar
, on this page I would like to grab all books with the bar
tag and put them into a table
OK. You don’t need to change the application structure for this. You just need to use a bit of scripting to get all the books that have a specific tag. See https://extensions.xwiki.org/xwiki/bin/view/Extension/Query+Module . If you mix the “Query listing all documents containing XWiki Objects (XObject) of a given XWiki Class (XClass)” example (which would give you all the books) with the “List documents having at least tags tag1 and tag2” example (which would give you all the pages with a given tag) you get something like:
from doc.object(XWiki.TagClass) as tag, doc.object(Books.BooksClass) as book where :category member of tag.tags
Now, if you’re looking for a live table like the one you have on the application home page then you can do this:
edit the home page of your application using the wiki edit mode (you need to be an advanced user)
copy the code to the category page
add this line after the 'tagCloud': true,
line
‘selectedTags’: [‘putYourTagHere’],
Hope this helps,
Marius
Thanks a lot I will apply your advice