I need a sidebar on my website which can be edited like normal grav page. The sidebar is in the template/partial. How can i get the content of my page “sidebar” imported?
Well, with twig it is easy:
{% include 'partials/sidebar.html.twig' %}
There is several grav skeletons that use sidebar, take a look at antimatter or Pinpress.
Hope it helps!
thanks - this works, no more global error. But how do i get file user/pages/sidebar/sidebar.md
into the twig-file?
the file is user/pages/sidebar/default.md
of course…
Use {{ pages.find('/sidebar').content }}
Great - it works ! Thanks !