Get value of Site Custom Attribute in template file (8.x.x)
Permalink
Hi, people!
I've created a Custom Attribute for Site object (in Dashboard section System & ... -> Basics -> Names & Attributes). It could be a Logo image for my website. I see that in database table this attribute is marked as 'sitekey'. Maybe somebody knows convenient method to get attribute value in template file?
- Doesn't work
I've found out to do it like (using object Site):
Can somebody suggest something else? Something like getAttributeByHandle?
I've created a Custom Attribute for Site object (in Dashboard section System & ... -> Basics -> Names & Attributes). It could be a Logo image for my website. I see that in database table this attribute is marked as 'sitekey'. Maybe somebody knows convenient method to get attribute value in template file?
$c->getAttribute('logo');
I've found out to do it like (using object Site):
Can somebody suggest something else? Something like getAttributeByHandle?
So, in other words: