Skip to content
Grav 2.1 is out: every page speaks Markdown. Read the announcement →

Adding custom SVG icons to navigation menu items

theme

Started by Jon 4 years ago · 1 replies · 1312 views
4 years ago

Hello and thank you for a CMS that is a breath of fresh air! Really enjoying the flat file cms approach.

I am building a small web-store using the shop skeleton , which uses the antimatter theme. I have inherited the antimatter theme and using a custom.css and base.html.twig to get the site looking unique.

I have a number of SVG files that i have added to the footer and managed to get the SVG main site logo working (after reading this discord forum) by adding the following to base.html.twig

HTML
<div id="logo">
    <h3>
       <a href="{{ base_url == '' ? '/' : base_url }}">
          <img src="{{ url('theme://images/myshoplogo.svg') }}" />
       </a>
    </h3>
</div>

But how can i use custom SVG icons in the menu items. I looked at inheriting navigation.html.twig but then get a little lost. Is anyone able to help me here and give me a few pointers?

Thanks

last edited 05/29/22 by Jon
4 years ago

@jon,

I looked at inheriting navigation.html.twig

That seems to be a proper approach...

but then get a little lost.

  • What have you tried?
  • On what part did you get lost?
👍 1

Suggested topics

Topic Participants Replies Views Activity
Themes & Styling · by FrViPofm, 16 hours ago
1 30 3 hours ago
Themes & Styling · by stuart young, 1 month ago
3 480 1 month ago
Themes & Styling · by Sebadamus, 2 months ago
5 481 2 months ago
Themes & Styling · by martynfoster735, 2 months ago
1 460 2 months ago
Themes & Styling · by Justin Young, 2 months ago
1 490 2 months ago