I would like the label list to be the current labels of the page. How can I do that in confluence ?

Benoit des Ligneris July 12, 2016

This question is in reference to Atlassian Documentation: Content by Label Macro

I want to display a link toward all pages with the same labels as the current page.

This is for a knowledge base :  I want all similar FAQ questions to be displayed at the bottom of each of my FAQ articles.

  • The "Content by Label" dot now allows this
  • The "Related labels" is somehow displaying the current label list with a link to search and not to the article titles the article (could be useful if the number of links where displayed !)

 

3 answers

0 votes
Robert Reiner _smartics_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 28, 2018

Deleted. Please see reply above.

0 votes
Robert Reiner _smartics_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 14, 2016

The projectdoc Toolbox allows to create queries on documents based on the document that contains the query. Unfortunately this add-on is only available on premise.

Suppose you need to select on the Tags property, the query (using the Display Table Macro) will look like this:

   Tags=${Tags}

That is: find all documents with the Tags property (left hand side) matching the tags provided in this document (referenced by ${Tags}). Note that the list of tags is 'anded', therefore all tags need to be specified on a document to make it part of the result list.

There is a tip with an example on our web page: List related Pages.

Biased alert: I'm one of the authors of this commercial add-on. smile

Benoit des Ligneris July 14, 2016

Yes. This would be quite similar to that wink

Any chances this will work on the cloud edition ?

Robert Reiner _smartics_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 14, 2016

Unfortunately no. sad

The toolbox add-on is bound to the Java API and therefore requires to be installed on the on-premise version of Confluence. There are no plans to provide a cloud version of the projectdoc Toolbox in the near future.

Malcolm Cook January 8, 2018

Hi @Benoit des Lign - If I understand correctly, this could NOT be used in conjunction with the "Content By Label" macro.  This special syntax, 

Tags=${Tags} 

 will only work in macros included with your product.  Is that correct?  Thanks.

Robert Reiner _smartics_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 15, 2018

Yes, this is correct: It works only with the projectdoc Toolbox.

Javier Távara August 24, 2018

@Robert Reiner _smartics_ I've just installed you addon, looks great. What if I want to show posts with SOME of the ${Tags} ?

Robert Reiner _smartics_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 28, 2018

Deleted. Please see reply below. :)

Robert Reiner _smartics_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 28, 2018

@Javier Távara: Sorry, it seems that may last reply did not get published (probably to something I messed up).

I assume you are using a macro like the Display Table Macro. You can select on any literals you want. For instance


$<Tags>=[One] OR $<Tags>=[Two]

If you have a list of values you can also use


$<Tags>~(One, Two)

Besides the OR you can also use AND or NOT (but NOT only as connector for the second value as in

$<Tags>=[One] NOT $<Tags>=[Two]

The list operator assumes the values of the list to be or-ed.

More information on creating queries for the macros of the projectdoc Toolbox can be found in Search Tips.

A second approach would be to define the set of query values as a new property of the document by the use of the Document Properties Marker Macro. E.g. "My Search Params"="One, Two" (The first is the key, the second is the value, controls (third column) could be set to "hide" if they should not render.

Then you would use


$<Tags>~(${My Search Params})

You could use the Display Document Property Macro (or one of its relatives) to add these property values to the Tags property (this is a bit clumsy currently since you need to add the value separator manually and therefore need to know if there are already a values).

0 votes
spud
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 13, 2016

Hi @Benoit des Ligneris - thanks for your question.

So, as far as I can understand, what you're asking for is a way to automate the content by label macro to populate the 'labels' field with the same labels as on the page it's on - is that right? 

There's no way to do this at the moment. The content by label macro will create a list of all the articles tagged with the labels you put into the macro, but you can't set the macro to automatically to pull the same labels as the page. You have to put those labels in manually.

 

Let me know if I've misunderstood your question!

 

Benoit des Ligneris July 14, 2016

Yes. That's it !

I wonder why this is not possible : indeed, I can imagine most of the knowledge based (FAQ, etc.) should greatly benefit from this key  functionality.

Is this a function planned for development ?
How can I suggest this function ?

Also, are you aware of any plugin that can do that on the cloud ? 

spud
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 14, 2018

I had a look but I don't think there any plugins that do that. 

I totally agree that it's a nice idea - being able to display related pages.

What you could do is create a feature request. This doesn't guarantee it will get built, but if it looks like something lots of customers want (judged by votes) then it is likely to get picked up by someone. 

Like # people like this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events