Problems, need help? Have a tip or advice? Post it here.
3 posts Page 1 of 1
I would like to use the cloak_email tag, but I'd also like to have the email address set up as a custom field - it will be updateable in just the one place, but displayed in several.

I can do these things separately:

<cms:cloak_email 'mail@address.com' />

<cms:get_custom_field 'email_address' masterpage='globals.php' />

BUT, not sure if it's possible to do both? Anyone any idea? :?
Hi potato. You certainly can do this.
Code: Select all
<cms:cloak_email "<cms:get_custom_field 'email_address' masterpage='globals.php' />" />
The key reason why this works is because of the use of double quotes. If we decided to use no quotes or single quotes, this would not work as intended.
http://www.couchcms.com/docs/concepts/setting-parameters.html (Emphasis added)

If single quotes are used, Couch considers the parameter's value to be an explicit value.
If double quotes are used, Couch considers the value to be either an explicit value OR the output from a nested tag.
If no quotes are used, Couch considers the value to be a variable.
thanks Cheesy for uber-quick response! Code implemented and working!

Double/single quotes: another Couch fact I must commit to (my already overflowing) memory.
3 posts Page 1 of 1