Hi,
newbie issue...
I want to make a single file accessible to download from several pages.
I created a chunk for the dowload button, called by each correspondant template,
but as the TVs are local to templates, how can i do that without filling a TV in each template ??...
thanx by advance.
[ed. note: spidflinch last edited this post 14 years, 5 months ago.]
-
☆ A M B ☆
- 24,524 Posts
I don't quite understand what a TV has to do with this. Or are you referring to "templates" when you mean "resources", and you have a TV to indicate whether or not you want the link displayed on that resource's page?
you can put this chunk-tag into a dropdown-TVs input-option-values like this:
download=={{myDownloadChunk}}||no download==
and put this TV-tag into your template.
If its name is download:
this way you can switch the download on/off for each resource.
You can set the TV's default value to whatever you want and it will be available for any page where it's not set. You can also set the TV default value to @INHERIT and set it in a parent or ancestor further up the tree, or set the default value to @INHERIT somevalue and have both of the above.
------------------------------------------------------------------------------------------
PLEASE, PLEASE specify the version of MODX you are using.
MODX info for everyone:
http://bobsguides.com/modx.html
thanx everyone : with these 3 solutions i should make it out !
[edit] getField just made it perfectly !
[ed. note: spidflinch last edited this post 14 years, 5 months ago.]