Sidebar content using Quark

Hi,

So I read through many of the postings regarding this matter - I wanted to add a sidebar to the basic theme, Im using just the basic Grav download with quark added and necessary plugins.
The route suggested is that you create a page thats hidden called sidebar from which the content is extracted, and then displayed.

So the page responsible for doing this is partial sidebar.html.twig - all good this makes sense. Reading that - you get the line

{{ page.find(’/modules/sidebar’).content|raw }}

And reading another posting relating to another theme this seems to have been truncated to be like this,

{{ page.find(‘sidebar’).content }}

Now, when I edit the sidebar.html.twig - and swap out this line it works as expected. but I have to say that its a bit confusing as to why its set to this? perhaps someone can explain?

{{ page.find(’/modules/sidebar’).content|raw }}

many thanks

@louigi, What exactly do you want to achieve?

  • Do you want to display/reuse the content of a certain page (or module) inside the sidebar of another page or pages?
  • Or do you want to create a sidebar containing the output of plugins? Like a SimpleSearch, Popular Categories, etc. See the Blog demo.

Hi,

Well both if Im honest - I want a bit of an editable page and also have some plugin / feed stuff.

I have that now - as Ive edited the sidebar.html.twig file. Its looking for the sidebar page in blog folder and its automatically chucking in bits from the plugins.

I was just confused as to why in the twig file its going to /modules/sidebar - why not simply /sidebar as Ive used which obviously works?

many thanks