getgrav / grav-plugin-page-inject

Grav Page Inject Plugin
https://getgrav.org
MIT License
32 stars 6 forks source link

I'm injecting more than I should #28

Closed GogoFC closed 7 months ago

GogoFC commented 2 years ago

I'm using [plugin:page-inject](/home/welcome/) and the one with path, because the one with no explicit path doesn't work [content-inject path="/route/to/page" /]

and I'm injecting the footer of the whole page, unless I inject content but then content isn't formatted.

The photo is about the middle of the page, I now have two footers?

How can I solve this. Also it breaks my menu :)

This is a fresh quark theme with first page being blog.md

Screenshot 2021-12-31 035330

Then on the actual page that was being injected, this happened :) I get two footers

Screenshot 2021-12-31 040014

grahamIT commented 1 year ago

I figure out how to fix this. All you need to do is create a modular page instead of a standard page.

bonnebulle commented 7 months ago

I had the same issue... ALL the template file is injected ! Not only the text content... So, in my modular.html.twig I have spaces ... So, when the content is injected... ···<div id="my_modular">blablabla</div> My post injecting it (in Markdown) ... convert this spaces ··· into <code><div id="my_modular">blablabla</div></code>

My commented issue can help others to figure what is going on.. An option to inject only a specific part (like page.content) should be very helpfull Thanks, very usefull piece of code !

GogoFC commented 7 months ago

I figure out how to fix this. All you need to do is create a modular page instead of a standard page.

Awesome thanks for the very late reply :) and I also replied very late.