misc:zola_tips
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
misc:zola_tips [2022/12/25 03:41] – [Marking a menu item as active] mithat | misc:zola_tips [2022/12/25 22:57] (current) – [Sections and _index.md] mithat | ||
---|---|---|---|
Line 16: | Line 16: | ||
<WRAP center info 80%> | <WRAP center info 80%> | ||
- | This whole setup seems like it's more complicated than it needs to be. | + | This scheme |
</ | </ | ||
Line 23: | Line 23: | ||
'' | '' | ||
- | If you don't have a '' | + | You don' |
You can nest sections. | You can nest sections. | ||
Line 141: | Line 141: | ||
No doubt, there are opportunities to stuff some of this into macros and/or partials and/or similar. | No doubt, there are opportunities to stuff some of this into macros and/or partials and/or similar. | ||
===== Breadcrumbs ===== | ===== Breadcrumbs ===== | ||
- | See this [[https:// | + | See this [[https:// |
+ | |||
+ | <code twig> | ||
+ | {% block breadcrumb %} | ||
+ | <div class=" | ||
+ | <a class=" | ||
+ | {% set current = section | default(value=page) %} | ||
+ | {% for ancestor in current.ancestors %} | ||
+ | {% if loop.first %} | ||
+ | {% continue %} | ||
+ | {% endif %} | ||
+ | <span class=" | ||
+ | {% set section = get_section(path=ancestor) %} | ||
+ | <a class=" | ||
+ | {% endfor %} | ||
+ | <span class=" | ||
+ | <a class=" | ||
+ | </ | ||
+ | {% endblock breadcrumb %} | ||
+ | </ |
misc/zola_tips.1671939661.txt.gz · Last modified: 2022/12/25 03:41 by mithat