been trying to figure this out all day. have poured over these forums, the documentation, & the wiki.
i feel i’ve gotten very close, but am still missing a few key things. so any help would be much appreciated.
please note also that i’m new to ModX - using it on my first client site now, but i LOVE it!
so, i want to be able to allow the client to create content for the sidebar of the site i did, but want that single content to appear in the sidebar of most of the other pages without the client having to copy/paste from one "template variable" on one page to another.
pretty much a "php include" would rock - ’tis what i’ve done previously and given the client the ability to edit a simple txt doc. but i think i can do much better with modx.
so here’s where i’ve gotten...
1) i created a new document called "sidebar" and gave it NO template assignment
2) i created a new template variable with these specs...
- variable name: sidebardocument
- caption: Include SideBar doc
- Description: Auto SideBar Inclusion
- Input Type:

(i don’t know what to choose here. i chose checkbox for now. will explain why below)
- Input Option Values:

(i don’t know what to do here)
- Default Value: @DOCUMENT 218 (#218 is the number of the above created "sidebar" document)
- Template Access: i checked the templates i want this in
okay, so this works - sorta.
the content created in the sidebar document ’does’ show up on all the pages that the sidebardocument template variable is linked to.
so that’s successful.
but what about the "input type" and the "input option values" for this template variable?
the checkbox is useless. when you go in to edit one of the pages that this TV is linked to, it does show the checkbox and any text i put into the "input option values" field, but it doesn’t do anything to it - no affect.
i thought it would be really cool to have this as an "option" for the client. so they could choose whether or not to have the content they create in the sidebar doc show up in the doc they’re editing. so i though the checkbox here would turn the feature on or off. but it doesn’t. so then i read somewhere that radio buttons work better - tried that, but still, no affect.
do i need to put some sort of "show/hide" code in there?
i read that the @EVAL command might be the route to go, but i’m not sure. and i don’t know the php code i would need to know for this.
so please help here.
THANKS,
-jason.