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

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

This widget could not be displayed.

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!

 

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 ? 

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. 

This widget could not be displayed.

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

Yes. This would be quite similar to that wink

Any chances this will work on the cloud edition ?

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.

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.

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

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

@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).

Deleted. Please see reply above.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Sep 17, 2018 in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

569 views 7 6
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you