Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

Modifying the Learn4 Theme

Started by Phil White 1 year ago · 4 replies · 567 views
1 year ago

Is it possible to modify the Learn4 theme to remove the numbering of the top-level items and the checkmarks in the left navigation panel?

1 year ago Gez i couldnt find learn4 theme at https://getgrav.org/downloads/

I downloaded it from GitHub here. Maybe it has not been released yet. Looks like it is still in development, but it is being used. I have no experience with website coding and am just shooting in the dark. I didn't create a new theme by inheritance. I just copied the Learn4 theme that I downloaded from GitHub into the themes directory. It seems to work OK. I guess I should just switch to the learn2 theme.

last edited 06/26/25 by Phil White
1 year ago

@phil, regarding the solution (minimal steps):

  1. copy the learn4/templates/macros/macros.html.twig to yourtheme/templates/macros/macros.html.twig
  2. remove or comment out line 13
  3. do the same for <b>{% if data_level == 0 %}{{ loop.index }}. {% endif %}</b> in line 14

As already mentioned, the recommended approach is to make changes to the inherited theme. And yes, the Learn4 theme is a testing release, but since it's used on learn.getgrav.org, that would be enough for me to try it out.

Suggested topics

Topic Participants Replies Views Activity
Themes & Styling · by FrViPofm, 4 weeks ago
4 474 2 weeks ago
Themes & Styling · by johan thomas, 5 years ago
1 800 3 weeks ago
Themes & Styling · by stuart young, 2 months ago
3 660 2 months ago
Themes & Styling · by Sebadamus, 3 months ago
5 680 2 months ago
Themes & Styling · by martynfoster735, 3 months ago
1 642 3 months ago