I want to display the 'name' or 'title' of the active layer in View-Decorations-Title, I found in "Automatically create an array of all visible layer names in QGIS" the answer:
array_to_string(
array_foreach (
@map_layers,
layer_property(@element,'name')
)
)
but, it shows all visible layers, and I can't find an expression for the current layer that can use in something like:
layer_property('active_layer???','title')
I'm using QGIS 3.26.3 in LinuxMint 20.2.