The content-by-label macro only automatically applies to labels that were added on page creation, but I would like it to update as labels are added any time after page creation as well.
So I made a workflow parameter in my comala workflow that keeps track of labels.
Is there a way to input whatever the get-metadata macro returns into the content-by-label's cql parameter? I'm looking at the source editor for the template where the content-by-label macro is included, specifically these parameters of the macro:
<ac:parameter ac:name="cql">label in ("label1","label2","label3") and type = "page" and space = "space1"</ac:parameter>
<ac:parameter ac:name="labels">label1 label2 label3</ac:parameter>Elsewhere is the get-metadata macro:
<ac:structured-macro ac:macro-id="28eb522b-a95e-446f-a595-9ceb4fa4fba6" ac:name="get-metadata" ac:schema-version="1">
<ac:parameter ac:name="name">Labels</ac:parameter>
</ac:structured-macro>
Without using any third-party plugins, surely there must be a way to pass the output of get-metadata to content-by-label? Possibly by setting a template variable equal to the former's output, and then placing that in the latter's parameter declaration?
Something like:
<at:declarations>
<at:list at:name="Labels">
<ac:structured-macro ac:macro-id="28eb522b-a95e-446f-a595-9ceb4fa4fba6" ac:name="get-metadata" ac:schema-version="1">
<ac:parameter ac:name="name">Labels</ac:parameter>
</ac:structured-macro>
</at:list>
</at:declarations>
.....
<ac:parameter ac:name="cql">label in $Labels and type = "page" and space = "space1"</ac:parameter>
<ac:parameter ac:name="labels">$Labels</ac:parameter>
This doesn't work but if anyone has any idea whether this is on the right track or what can be done, I'd appreciate it! If there's a way to do this directly in the workflow markup itself, that would be even better!