I had an idea for how to make PM-generated Emails look on-brand, but I don't know if it's currently able to be implemented.
As I see it, storing Brand attributes in the database also allows for easy updates to a site's look, while making the transition seamless for any branded emails.
So my question is--can a site's properties/attributes be accessed using any native (or plugin) function?
I was also looking around to see if I can find the UUID of the site itself, but I can only seem to find the UUID for a Constant version of that Site.
Discussion posts and replies are publicly visible
I just put constants into some of the expressionable values. Then created a small UI/process to update these. No DB required.
TIL you can update a constant using a Smart Service! Thanks so much, Stefan. That sounds easier.
My question does still stand since I'm envisioning an application with more than one site, which therefore may contain more than one set of branding configurations. If an interface is reused on any of those, is it possible for it to 'know' which site it is being displayed on?
AFAIK there is no direct way. You could create a wrapped interface for each branding and call the actual interfaces passing a branding value. Not very dynamic, I know. Maybe others have better ideas.
My old trick for getting the current site on an interface (which.. partly depends on where you're accessing the interface from of course), is to pass down a text variable i.e. "siteContext" into all shared interfaces, where you pass in a unique identifier for the site (like its key). All interfaces you call directly from the site configuration need to be unique, and these are just wrappers for the shared interface(s) with the siteContext value passed in.
Thanks guys! Mike, your answer makes good sense to me. Have good days.