This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

Mohsin
Mohsin

In your page / layout markup use:

{% if logo is null %}
    No logo
{% else %}
    <img src="{{ logo }}"/>
{% endif %}

In Code tab use:

function onStart()
{
    $this['logo'] = Backend\Models\BrandSetting::getLogo();
}

Edit: Changed BrandSettings to BrandSetting as pointed out by aaomelyanchuk22195

Last updated

aaomelyanchuk22195
aaomelyanchuk22195

Thanks it is cool ! But you made a mistake : BrandSettings - wrong, must be BrandSetting. Thank you very much for your help!!!

Mohsin
Mohsin

aaomelyanchuk22195 said:

Thanks it is cool ! But you made a mistake : BrandSettings - wrong, must be BrandSetting. Thank you very much for your help!!!

Done, corrected it. Thank you.

manhhp
manhhp

So, Can I get app name, app tag line,... from Customize Backend ? Can you guide me? Thank you !

Mohsin
Mohsin

BrandSetting uses the SettingsModel so you can query it using the get method easily, like..

function onStart()
{
    $this['app_name'] = Backend\Models\BrandSetting::get('app_name');
    $this['app_tagline'] = Backend\Models\BrandSetting::get('app_tagline');
}

1-5 of 5

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.