MODX Community

How use properties (parameters) of template in template

Templates in MODX have the tab PARAMETERS.
So [[+sirius_title]] - displays by default in the template itself.
But [[+sirius_title@newSirius]] - the value is still the same, but it should be different. (newSirius is the name of the parameter set.)
Help please.

My guess is that you have created the property set and specified it in the tag, but have not “attached” it to the template.

Edit the Template and, on the “Properties” tab, select “Add Property Set.” Select the property set, then click on “Save Property Set,” then click on the “Save” button at the upper right to save the Template.

You should also be able to make the connection in System -> Property Sets by right-clicking on the property set and selecting “Add Element to Property Set,” but when I tried it. it doesn’t work with Templates.

The fact of the matter is that the set is created and attached, but does not work.
More precisely, in theory, it should not work (??? or should ???)
If we create a set of parameters in Chunk, then in the Template when calling this set: [[$testit@MyParams?]] - It works in a chunk.
But we can call a chunk, and how to call a template with parameters if a call is not provided? …
Maybe I’m not calling the template parameters correctly? Then how to call?
Thank you.

There you have it - you can’t set a property set to be used by a template, so what you’re trying to do is impossible.

You can only use the Default property set on templates. That will make the [[+placeholder]] tags from the property set available in your template.

Oh, sad.
Thanks you.