[Qgis-user] Printing layouts with QGIS Server: hide page based on passed labels

Jorge Gustavo Rocha jgr at geomaster.pt
Wed Aug 19 15:52:26 PDT 2020


Hi,

I have a layout with 2 pages. Based on a label passed to GetPrint
request, I want to print just page 1 or both. I would like to write an
expression to the "Exclude page from exports" page property on the
second page, based on a label value passed by GetPrint request.

The label(s) passed to GetPrint are ItemID assigned in the layout. The
layout receives the label and assigns its value to the label item with
the itemID. Super cool!

By I'm not able to write a boolean expression to use on the page
properties, that compares the value of the label with a string.

For example:

map_get ( item_variables( 'Etiqueta' ), 'item_id' )

returns the variable name 'Etiqueta', which I already know. I would like
to have its value. Is it possible to get the value of this item in an
expression?

Probably we need to expose the value (as string) in the item_variables
map. It does make sense for a label or html item (just a string), but no
so much for a map item.

Regards,

Jorge Gustavo

-- 
Email Signature
Logo <https://www.geomaster.pt> 	
*Geomaster*
*Jorge Gustavo Rocha* | Software Engineer
*e:*jgr at geomaster.pt | *m:*+351 910 333 888
*g:*41.54094,-8.40490 | *v: *510 906 109
*a: * Rua António Cândido Pinto, 67, 4715-400 Braga

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20200819/169b018d/attachment.html>


More information about the Qgis-user mailing list