Template Variable Output

Is there a way to dump all template variables in a script/snippet?

I’m trying to convert an older site that was using Articles for a Blog on ModX 2. We moved to a new site on ModX 3 and opted not to install Articles, trying to go for less extras. I can get the page to show up correctly except for one TV?. I can see the TV when I run getResources, but when the page is actually displaying I cannot get the TV to display.

I’ve tried [[*blog-image]], [[+blog-image]]. When running getResources it shows up as [[tv.blog-image]]

No errors in the ModX Error Log either.

Thanks for the help!

When the name of the TV is “blog-image”, this MODX tag (with the *) should output the value of the TV on the resource itself.

Maybe check the “Output Type” of the TV (in the tab “Output Options” when editing the TV). If the output type is “Default”, you’ll have to add the <img> tag to the template/chunk/resource-content yourself.

1 Like

Thank you, output options got me in the right place. It seems that the Articles plugin must have had some affect on AccessPermissions. Once looking at the options I noticed the AccessPermisssion were not set, once enable the image begins to show.

Thank you for pointing me in the right direction. I know enough to be dangerous.

If you mean the access_permissions Manager permission, be careful. Any user with that permission can change your password, and do a lot of other scary stuff.