Hi all
I want to use a template variable which i can use to put secondary content into. This has to work individually for every document in the document tree.
For this purpose i created a template variable in the "manage ressources" -> "template variables" part of the modx manager. Into its variable name field i entered: sidecontent. Into the caption field i entered: [*sidecontent*]. I entered a description and selected "Text" as an input type. Also i entered the following default value: This is the default. Finally i allowed the only template i am currently using to access/process the variable.
In the html template i retrieve the content of the template variable by using "[*sidecontent*]" in a div i placed for it. Now if i load an arbitrary page that uses this template i can see the output of the default value in the sidecontent.
The problem is though that i don’t seem to be able to actually edit the template variable for each page individually.
I do get an editor for it in the "Template Variables" part below the document but if i make changes to it does not get saved together with the page. Instead i see the default value appear if i edit the page again or show it from the frontend.
Am i missing something? How do template variables get saved? I have tried to use template variables of both richtext and text type but i keep getting only the default value i entered