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.

General

Custom Class for Modular Pages

Started by Thomas Foy 6 years ago · 1 replies · 449 views
6 years ago

Is it possible to assign a custom class to a modular page? I know I can add body classes to the parent page but cannot seem to be able to add a custom CSS Class for the child modular pages.
I tried adding class:myclass to the frontmatter and in the md file but it is not recognized.

Thank you.

6 years ago

I am not sure if there is a built in way to do this but I just modified the twig template to allow the modular template to use body class for the modular-row.

I am testing with bootstrap and adding bootstrap classes to set width and position of the modular pages.

Suggested topics

Topic Participants Replies Views Activity
General · by Jerry Hunt, 4 days ago
2 82 11 hours ago
General · by pamtbaau, 16 hours ago
1 53 15 hours ago
General · by Andy Miller, 1 day ago
0 45 1 day ago
General · by Marcel, 12 months ago
6 347 5 days ago
General · by Duc , 5 days ago
3 41 5 days ago