Forum
General Settings (telephone, email, address)
Is there a good way to have sitewide config that can be re-used, for example a phone number and address can be rendered in many places, and so a single variable would be great to handle this, and edit via the UI.
At a look, the 'general settings' make sense to house this, but I wonder if there is somewhere else this sits.
Dan
Would you say this is similar to the requirement discussed earlier today?
https://forum.grabaperch.com/forum/02-09-2016-allow-user-to-re-use-certain-strings-across-the-site-to-be-used-within-region-text
yes that does sound like it. is there another approach to reduce duplication you would recommend, such as hardcode a static variable somewhere? otherwise, duplication of strings it is for now.
thanks, Dan
I often create a region called 'Company Details' and have fields in it for: Company Name, Address, Telephone, Email. I set it to 'share across all pages' (this places it in a nice position at the top of the Page UI). Then I use Perch Content Custom to output any of those details wherever needed in the site.
Simon that is a nice solution I hadn't thought of before
Simon, How are you rendering an individual variable in this way? At the moment, I am having to put a new content template for each variable, but imagine there is a much better way. I have the shared variables working nicely though, so thankyou for that
Hi Dan,
That's great. I use
skip-template
to avoid having to create different templates for each, like this:Thanks Simon, that is a perfectly neat little solution, I will replace the excessive html files I have now and replace with what you shared.
Thanks for the help, Dan
\o/ that's great Dan, thanks.