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:

-->Preview  No feature was found on this layer to evaluate the expression.

--> Preview: Expression invalid


1 Answer 1


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 you have read our privacy policy.

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