0
Welcome Guest! Login
0 items Join Now

Using modular pages to populate layout positions

  • Using modular pages to populate layout positions

    Posted 5 years 11 months ago
    • Hi,

      I've been thinkering around with Grav for a few days now. I recently bought a Gantry based theme and fiddled around a bit.

      Is it possible to use modular pages (which are native in Grav) to (let's say) fill up the sidebar regions in the template? For example, I have a website which contains 14 pages with a sidebar, but the content for this one's always different.

      I found this in the documentation, but I think it gives way too little hints on best practices. An example would be of great help!

      Regards.
    • Matt's Avatar
    • Matt
    • Preeminent Rocketeer
    • Posts: 21503
    • Thanks: 3081
    • messin' with stuff

    Re: Using modular pages to populate layout positions

    Posted 5 years 11 months ago
    • disclaimer: I'm not a Grav nor Gantry dev

      To me, the way you manage content is fundamentally different when you get Gantry in the mix.

      When you say the "content... always different" do you mean in the Sidebar or the Main Page content? It sounds to me like this this would be best managed through Gantry's Inheritance
    • SEARCH the forum first! These boards are rich in knowledge and vast in topics. This includes searching just the 'Solved' forums, using Google, and using ChatGPT :woohoo:
  • Re: Using modular pages to populate layout positions

    Posted 5 years 11 months ago
    • Not sure about modular pages, but you can get a regular Grav page content using the Gantry html particle, just need to activate twig proccessing and fetch your content with something like:
      {{ grav.page.find('your/page/route').content }}
    • Hugo Avila
      Paginas Web

Time to create page: 0.055 seconds