Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Gantry

Gantry 5, Modular-Pages and more ;)

Started by Michael Gollmer 9 years ago · 3 replies · 2769 views
9 years ago

Hello there,

I just reading through the Gantry 5 docs and I'm wondering how gantry handels modular grav pages concept.

I found the approach of Hibbitts Design ...
https://github.com/hibbitts-design/grav-gantry-particle-inject-page/blob/master/inject_page.html.twig

But there you have to define the page in the particle. Is this the only way to deal with the modular page concept or did I get something wrong?

I would really like to use gantry! It seems like the perfect tool for giving the user the possibility to really change the layout in a easy and fun way.

Best Regards,
Michael

Update:

I have an example szenario. When using grav I can define a template and use the template on multiple sites. Furthermore I'm able to define blueprints, wich help the user to fill the page with content and modular pages wich cotains certain parts of the page.

Can somebody explain how to solve this case with gantry? Do I need to build multiple layouts for the same kind of page, because there is always unique content for certain particles, or do I need to build special particles wich using twig for reading the assigned Data?

Another Update
I've installed Helium Skeleton and saw that modular pages were used ( slug: /pages/modular/_features ). There are 3 possible modular templates (Features, Showcase,Text) but I don't see where they are defined. I dont see them in the helium theme folder. Can somebody tell me if they re just part of the core, or is there a way to define them even if i use gantry?

last edited 08/15/17 by Michael Gollmer
9 years ago

Hi @paulhibbitts,

thx for responding ;) . I thought about how to inject the modular pages without giving a fix slug. So the particle only looks for a modular page in the childpages.

Should be solvable by using the pages object in your twig code for the active page in your particle.

Regards,
Michael Gollmer

👍 1
8 years ago

Hey Mgoll,

I'm confused about this as well. In the past I would edit modulename.html.twig to control layout of a module stored in user/themes/theme_name/templates/modular/. Have you figured out where Gantry puts this?

There are references to Positions which is Grav specific and Module Positions here:
http://docs.gantry.org/gantry5/configure/positions

But this gives you the ability to put particles in "modules". Not sure the name module here has anything to do with Grav modules.

Frankly the thing most like Grav modules to me is Gantry Sections.

Have you made any progress with this? Hella curious.

.: pl

Suggested topics

Topic Participants Replies Views Activity
Gantry · by Chris, 11 months ago
1 172 11 months ago
Gantry · by Sam, 1 year ago
7 220 1 year ago
Gantry · by Dima, 2 years ago
2 75 2 years ago
Gantry · by KimTaeWoong, 9 years ago
2 1882 3 years ago
Gantry · by stani, 6 years ago
2 831 3 years ago