Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Add logo to deliver theme

Started by Muut Archive 11 years ago · 8 replies · 1386 views
11 years ago

I want my company logo placed in users/images to show up on the header left-side (like the standard logo on all websites). I added "logo: \user\images\SandLogoOriginal.jpg" in site.yaml, but only the title shows up as text not the logo.

11 years ago

Thanks. Can you send me an example to add the logo in the base.html.twig and use it in site.yaml?

11 years ago

Really it's just HTML at this point, you can't do that?

11 years ago

SOLUTION (adding it for reference)::
Before:
<div class="logo">
<h3><a href="{{ base_url_absolute }}">{{ config.site.logo }}</a></h3>
{% block social %}
{% include 'partials/social.html.twig' %}
{% endblock %}
</div>

After:
<div class="logo">
<a href="{{ base_url_absolute }}"><img src="{{ base_url_absolute ~ config.site.logo }}" /></a>
{% block social %}
{% include 'partials/social.html.twig' %}
{% endblock %}
</div>

Entry in site.yaml
logo: /user/images/SandLogoOriginal.jpg

11 years ago

Glad you sorted it out. Really wasn't too hard right? :)

11 years ago

Hi Guys,

Thanks for adding this answer....this helped me to add a logo to this template also.

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1336 9 years ago
Archive · by Muut Archive, 9 years ago
2 925 9 years ago
Archive · by Muut Archive, 9 years ago
2 4056 9 years ago
Archive · by Muut Archive, 9 years ago
1 2941 9 years ago
Archive · by Muut Archive, 9 years ago
3 1112 9 years ago