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

Server side includes

Started by Muut Archive 11 years ago · 7 replies · 382 views
11 years ago

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

11 years ago

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.

11 years ago

Yes... it's there (from the page source):

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

11 years ago

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

11 years ago

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

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

11 years ago

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

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1330 9 years ago
Archive · by Muut Archive, 9 years ago
2 922 9 years ago
Archive · by Muut Archive, 9 years ago
2 4052 9 years ago
Archive · by Muut Archive, 9 years ago
1 2930 9 years ago
Archive · by Muut Archive, 9 years ago
3 1109 9 years ago