I need a drop-down-list in my Confluence template of all labels being used in common with another label.
Example
I have a lot of pages about tools. One page for each tool being used in the company. Each page is labeled with the label tool and the name of the tool, e. g. firefox.
I have a template for how-tos and need a drop-down-list, where the user can select the name of the tool, to which this how-to is related to. So I want a drop-down-list of all labels, being used in common with the label tool.
I think you are mixing Reporting plugin with Scaffolding plugin. You should focus only in Reporting Plugin. I am sure you can make a report that in one column has all "tool" labels (i.e. pages have the tool label plus the actual label that will be displayed) and in a second column a link to all pages that have that label.
You can control the scope of the search (a specific space, a list or all of them) with filters plus a filter for the label tool.
This is a piece of code that list labels (Tipo Contenido), number of ocurrences (Instancias) and the pages (Paginas) with that label in a Table with 3 columns for a specific space (space key = ROBCCHSWIFT) :
{report-block:output=wiki} {space-reporter:space=ROBCCHSWIFT} {text-sort:space:name} {space-reporter} {report-body} {report-table} {local-reporter:space:labels in content} {text-filter:label:title\|exclude=vision,567} {text-sort:label:title} {local-reporter} {report-column:title=Tipo Contenido}*{report-info:label:title\|link=false}*{report-column} {report-column:title=Instancias\|injected=true}{report-variable:Space Content}{local-reporter:label:content} {text-sort:content:title|order=ascending}{content-filter:@self\|space=%report:parent > report:item > space:key%} {local-reporter}{report-variable}{report-info:variable:Space Content > size}{report-column} {report-column:title=Paginas}{report-info:variable:Space Content\|link=true}{report-column} {report-table} {report-body} {report-block}
Hi Adolfo,
this looks awesome, but it is not what I'm searching for. If found two threads containing very similar questions:
But the result of both is, that it doesn't work that way (actually with Confluence 3.x).
Maybe a workaround is possible, like a (meta-)page, where you aggregte and store all related labels and then aggregate the content again as list-data items. But I'm not sure, if this would work, 'cause I'm very new to Confluence and I don't have much experience.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I decided to work around the problem. I have created a user macro called tool-list, which creates (manually) a list of tools I have. This macro can be embedded in several templates, if needed. If I get another tool, or have to remove a tool, I have to add or remove it once in the user macro. This is not as elegant than aggregating these information by labels, but works as well.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Matthias,
OK, here we go, let's create a short design pattern.
First page: 'Source'
This page contains a table-data macro. You can use multiple table-data macros on the same page. To organise them, you should put them in column macros. I usually hide them in View mode with the show-if macro and place this data at the root node of my content section (e. g. 'Software', 'Terminology', etc.). I call the space 'EXAMPLE' in this snippet. The data field is just called 'Category'.
{section} {column} {table-data:order=asc|name=Category} || Category || |{text-data:content=wiki|name=Category|atlassian-macro-output-type=INLINE|type=line}{text-data}| {table-data} {column} {section}
Second page: 'Target'
This page uses a local-reporter inside of a list-data to report on your 'Source' page. The fetched data is returned as list-options. Feel free to use multiple list-datas on the same page. They will also work in live-templates.
|| Category | {list-data:Category|required=true|multiple=true}{report-block} {local-reporter:data:Category|source=EXAMPLE:Source} {report-body:injected=true}{list-option}%data:Category%{list-option}{report-body} {report-block}{list-data} |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Stefan, it's a year on from your original post here and I'm trying this using possibly newer Confluence and maybe more recent staging and reporting plugins. All is well until step 5. When I "edit contents" there is a Category selection list but there are no options. Any ideas what I need to adjust?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Never mind. I figured it out. The word EXAMPLE in the source in local-reporter is a space key. I almost slit my wrists trying to get this to work with my space *named* EXAMPLE - it's space key is "EX" Arggghhh!!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
One possible approach here would be to use the Reporting plugin (from CustomWare) and analyse the labels in use in your space describing the tools. The Space Supplier is able to provide a list of labels used within the space.
More details here: http://wiki.customware.net/repository/display/AtlassianPlugins/Space+Supplier
The example in this case produces a list of labels used across the entire Confluence instance, but you could use local-reporter to limit this to the current space only. Additional filters could be added to limit the analysis further if required.
The labels will be returned as a list. It should be possible to use this in the construction of your drop-down list, so each element in the returned list generates a list element for your drop-down list.
Regards,
Charles
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Charles, thanks for your answer. I'm currently stumbling about the problem how to nest my report-info in list-options. This throws a lot of exceptions.
{list-data:my-tool-type|type=select|multiple=false|required=true}{report-block} {content-reporter:label=tool} {text-sort:label:title} {content-reporter} {report-body} {list-option} {report-info:title} {list-option} {report-body} {report-block} {list-data}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Stefan,
Have you thought about using the Expanding macro in the macros list? You could put a link to each tools page inside the box so, when the user clicks to expand the box, they can select the page they want to jump to.
Wes
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry Matthias, maybe the Run Macro is more useful and cheaper for your, but I did not use it so far. Scaffolding and Reporting are very powerful macros. Hundreds of our Confluence pages use these macros. With them you can create typified data, queries, useful reports, dynamic data and stuff like that.
To be honest: Think twice before installing a plug-in. And never trust a free plug-in!!! I used many plug-ins, which were free. And after a few months I had to tell my boss, that I need a few hundred bucks to pay for Confluence macros. OMG!
Good example: table-plus. Sortable tables in Confluence. This was a free plug-in, we use it on hundreds of pages. It became commercial, now it costs 200 $ and 100 $ renewal.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Stefan,
many thanks for the fast reply!
This solution appears amazing, indeed. Anyway, we need to evaluate if it's worth the money as we haven't purchased either the Scaffolding Plugin, nor the Reporting Plugin, so far. 800 bucks for both are quite a lot...
Are you aware of another cost neutral solution?
Thanks and all the best,
Matthias
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Stefan,
I'm looking exactly for the solution you're describing. Is the "tool-list" user macro working and available? I cannot find it anywhere...
Many thanks in advance!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It would be also nice, if someone would tell me, that it isn't possible to do that, if that should be the case. :)
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.