I’d like to move our templates over to static files, but when I did this, none of the MODX tags were processed. Any HTML shows up fine (headings, paragraphs, etc.), but if I refer to MODX page elements – such as [[*longtitle]] or [[*content]] – or MODX chunks or snippets – such as [[$myChunk]] and [[mySnippet]] – the MODX tags are displayed on the page as plain text and not processed. Any insights as to how to fix that?
I’m using MODX 2.7.1
This is an example of the literal text in the static file:
<html> <head> <title>[[*pagetitle]]</title> </head> <body> <h1>[[*longtitle]]</h1> [[*content]] </body> </html>
The output on the web page in the source code is literally this, with the unprocessed MODX tags:
<html> <head> <title>[[*pagetitle]]</title> </head> <body> <h1>[[*longtitle]]</h1> [[*content]] </body> </html>1
Also note the extra “1” at the very end of it all. That “1” shows up on the page and in the source code, but is not in the original file. I assume that’s a symptom of something not being processed as intended (PHP will sometimes output a “1” when a condition is true, for example).