1

In the Layout Manager, I want to change for a selection of layers the name displayed in legend without changing the layer names.

I am using QGIS 3.16

I am getting the legend entry names from the layer metadata (in my case the 'Title' data)

Properties Menu

This is what I have tested so far:

I went to the legend Items Menu

Legend Item

Edit icon

Label Menu

and I am trying to build an expression to display the title metadata

Expressions tested:

attribute('title')
-->Preview  No feature was found on this layer to evaluate the expression.

display_expression(@layer,'title')
--> Preview: Expression invalid

...

1 Answer 1

2

This one seems to work:

layer_property( @layer,'title')

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.