Sweet! That’s exactly what the doctor ordered.
Thanks!
Tangent-Warrior

Quote from: Mark at Aug 26, 2005, 12:28 PM
Yeah. Just use a template containing only my GrabPage snippet and then you can avoid copying and pasting.
Where can I find more information on Grabpage ? Etosite is down for now...
Thanks
Be not deceived: evil communications corrupt good manners.
I Corinthians (ch. XV, v. 33)
Great tip!! so I can include in modx any kind of code without difficoult.
That’s a nice tip netnoise.
Thanks for the info, I never thought of that.
This technique can be used with templates and chunks?
-
☆ A M B ☆
- 24,524 Posts
Yes, you can use a simple snippet to include your external file as the only content of a template or a chunk. Although I don’t think there’s much point in doing it with a chunk, since for the most part they are intended to be small bits of HTML and text, like footer content, that wouldn’t really much benefit from being in an external file.
Consider that MODx first has to go to the database to get the content of the chunk, then eval() the snippet’s php code, which in turn goes to the filesystem to get the external file. Kind of a lot of overhead for a couple of lines of text. But you have to weigh the cost/benefit and decide when it’s worth the overhead to make life more convenient.