Hiya,
I’m just looking into using MODx in a work enviroment, it looks perfect for what i want to do apart from one thing.
Are the templates always held in the Database? Ideally i would like the create the templates externally then save them to a directory, which MODx would then pull in as a template. As i use version control this template would then be included, so if something broke i could easily roll back.
At the moment the only way i see to do it is dump the database to a folder in version control, so it is then versioned.
I am probably missing something and this is really easy to do. Any pointers on how to do this would be great.
Thanks.
In your template put a single Snippet call.
In the snippet code, put [tt]return include( [...] );[/tt] and include the file you want your template to be in.
-
☆ A M B ☆
- 24,524 Posts
Better to make that two lines of code, sometimes you’ll get the "return" value of the include call (1 if successful) hanging around in odd places in your page!