Description
This module lists all pages, that are tagged1 with a specific tag. The scope can optionally be restricted to a single category.
Attributes
| attribute | required | allowed values | default | description |
|---|---|---|---|---|
| tag | no | an all-lowercase text string | none | limits displayed pages to the specified tag |
| category | no | valid category name | none | limits displayed pages to the specified page category |
Notes
If you do not specify a tag attribute, PagesByTag
- will use a tag that is specified by adding a trailing /tag/any-tagl to the URL, like http://{wiki-name}.wikidot.com/{page-name}/tag/{any-tag}
- will displays nothing if no tag is specified in the URL
If you do not specify a category attribute, PagesByTag
- will use a category that is specified by adding a trailing /category/any-category to the URL, like http://{wiki-name}.wikidot.com/{page-name}/category/{any-category}
- will displays pages from all categories
If PagesByTag is specified without attributes (i. e. [[module PagesByTag]]), it works nicely together with [[module TagCloud]]. If correctly set up (like on a default system:page-tags page), TagCloud generates links of the form …/tag/any-tag, which PagesByTag then uses to list those pages.
Examples
PagesByTag Standalone
what you get …
List of pages tagged with news:
Somehow no pages have been found...
If you don't see any PagesByTag output here, try adding /tag/any-tag to the end of the …/doc:pagesbytag-module URL. An example would be doc:pagesbytag-module/tag/news
what you type …
[[module PagesByTag]]
PagesByTag with Tag Attribute
what you type …
[[module PagesByTag tag="news"]]
PagesByTag with Tag and Category Attribute
what you get …
List of pages tagged with news from category _default:
(show from all categories)Somehow no pages have been found...
what you type …
[[module PagesByTag tag="news" category="_default"]]
Credits
The original text is located at the Wikidot Open Source Edition documentation pages.
Comments
How can I edit the label "list of page tagged with…."? I would like differente text.
Thanks
Ent
Can I use the functionality of search, ie highlight the search word in the result set, in a similar way with tags?
Currently when you tag a page and use the PagesbyTag it only list the Page Name. Then you have to click on the page and read through it to find the section that is most relevant to the tag.
Would be good to be able to display the content relevant to the tag as part of the initial PagesbyTag command.
Santo
Is it possible to order the result list?
You can achieve similar effects to this module using
You can define the text formatting and ordering options then.
ListPages module documentation