XF 2.2 Possible to use the Widget key from options or proprtties settings -> result in error "Template tag attribute "key" must be a literal string"

TheSkullKid

Active member
Hello @Kirby or @Jeremy P

you might able to help in the request. Is it possible to call xf:widget in the template with a key, which came from options or properties settings?

Code:
<xf:widget key="{{property('TestName') ? property('TestName') : 'whats_new_new_post'}}"/>

So if the property TestName is filled use this one, if not then use a default.

If I tried it I get the following error: Template tag attribute "key" must be a literal string

Thanks
 
Last edited:
Not really. You can use a widget position to allow for choosing which widgets to display in a given place, though I believe creating new widget positions requires an add-on.
 
Top Bottom