Hi, I'm creating a template for landing pages of tools being used in the company. I want to create a single page for each tool. In my template I want to have a section, where I'm aggregating content by label. Because I want to automate as much as possible, I would appreciate having a predefined macro, which aggregares the (single) label of the page plus another label.
Example
I have a section in my tool-page called How-Tos and I want to generate a list of all pages labeled with the label howto plus the label of my current page (name of the tool). In this case, the user would not have to change anything in the section How-Tos.
{contentbylabel:label=howto,+PAGELABEL}
If the label of the current page is msword:
{contentbylabel:label=howto,msword}
Is there any way to do it? We're using Confluence 3.4.
Thanks matt,
I have found a solution and wrote this small user macro
## @noparams
{contentbylabel:labels=howto,$content.getTitle()|excerpt=true|operator=AND|sort=title}
to get the current page's labels, use the $content objects getGlobalLabels() method:
#set($labelList=$content.getGlobalLabels($action.getRemoteUser()))
hth,
matt
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.