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

Modify templates in plugins

Started by Muut Archive 11 years ago · 5 replies · 352 views
11 years ago

Hy, I need to change css assets in cookiespolicy plugins without loosing changes in next update. How can I do? It's necessary to fork?

11 years ago

Unless there is something someday similar to inherited themes I guess you'll have to fork.
I had to keep one plugin properly translated but I admit I didn't look further.

11 years ago

There's no need to fork, just override the CSS in your theme. You just use a more specific CSS attribute to ensure it gets overridden.

I suggest you create a new theme and use theme inheritance though.

11 years ago

But what about a twig/template definition? Any way to use inheritance for that? Trying to modify the feed plugin template (to not have the graphic "banner")

11 years ago

Yes, you just need to provide your own version of the twig template in your theme. However, you do need to ensure the path is the same, but as the feed.atom.twig and feed.rss.twig files in in the templates/ folder of the plugin, you just need to copy and edit them directly in your theme/templates/ folder.

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1345 9 years ago
Archive · by Muut Archive, 9 years ago
2 932 9 years ago
Archive · by Muut Archive, 9 years ago
2 4059 9 years ago
Archive · by Muut Archive, 9 years ago
1 2945 9 years ago
Archive · by Muut Archive, 9 years ago
3 1117 9 years ago