Server side includes

Anybody ever try this in a grav page? If so, what was the magic incantation you used to get it work? I have all the markdown nonsense turned off because all my pages are just vanilla HTML (…and MarkDown, while it may be useful to some, is an incredible distraction for me). I’m trying to include a google calendar in my page using:

<!--#include virtual="user/frames/calendar.html" -->

“calendar.html” has the google calendar embed <iframe> in it. If I put this in a non-grav page in my site so I know server-side includes are functioning properly on the server, it works fine. However, if I put it in a gray page, I never see the calendar. The code gets emitted by grav.

Thanks in advance…

– sw

You might want to take a look at the PageInject plugin: http://getgrav.org/downloads/plugins.

However, this does rely on markdown syntax :frowning:

BTW, did you confirm that your server side include it visible in the HTML source output? I am pretty sure that Twig will just leave any HTML comments without messing with them.

Yes… it’s there (from the page source):

<article>
<header>
</header>
<!--#include virtual="user/frames/calendar.html" -->
</article>

And can you reach /user/frames/calendar.html in your browser?

Yes

Not sure then. I’m just not familiar enough with how server side includes are processed. Haven’t used them in probably 15 years! :slight_smile:

Might be something related to PHP processing and trying to process SSI also. Might be one or the other?

Yeah… my guess is that the SSI is being treated as a comment.