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

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

General

Antimatter logo instead of text - Dropdown menu issue

Started by Matt 8 years ago · 2 replies · 633 views
8 years ago

Hi

I'm currently using a custom logo instead of the text. I've achieved this by replacing this line in base.html.twig:

TWIG
<h3><a href="{{ base_url == '' ? '/' : base_url }}">{{ config.site.title }}</a></h3>

with

HTML
 <a href="{{ base_url == '' ? '/' : base_url }}"><img src="user/themes/antimatter/images/logonew.png" /></a></h3>

It's working fine for all pages except my dropdown pages. When using child navigation, the image does not appear. I've fudged this by created the directory it thinks it should be in. e.g.

services\user\themes\antimatter\images\logonew.png However, this then break the top level link for services.

Is there a better way to change the logo for all pages?

Thanks

8 years ago

Try with:

HTML
<a href="{{ base_url == '' ? '/' : base_url }}"><img src="{{ url('theme://images/logonew.png') }}" /></a></h3>

Suggested topics

Topic Participants Replies Views Activity
General · by Jerry Hunt, 4 days ago
2 74 6 hours ago
General · by pamtbaau, 11 hours ago
1 47 11 hours ago
General · by Andy Miller, 23 hours ago
0 43 23 hours ago
General · by Marcel, 12 months ago
6 346 5 days ago
General · by Duc , 5 days ago
3 39 5 days ago