<![CDATA[ Template as file - MODX Community Forums]]> https://forums.modx.com/thread/?thread=17594 <![CDATA[Re: Template as file]]> https://forums.modx.com/thread/17594/template-as-file?page=4#dis-post-96591 http://modx.net.ua.localhost/en/components/gettemplate) assigned to "OnLoadWebDocument" event.
It solves problem with managing keywords and metatags from MODx and some problems with caching snippets called from template.
Now my template code in MODx looks like:
@FILE:assets/templates/mytemplate/main.tpl

And template itself is stored at assets/templates/mytemplate/main.tpl]]>
Shugaev Nov 19, 2010, 04:18 PM https://forums.modx.com/thread/17594/template-as-file?page=4#dis-post-96591
<![CDATA[Re: Template as file]]> https://forums.modx.com/thread/17594/template-as-file?page=3#dis-post-96590 ]]> frippz Mar 05, 2009, 08:30 AM https://forums.modx.com/thread/17594/template-as-file?page=3#dis-post-96590 <![CDATA[Re: Template as file]]> https://forums.modx.com/thread/17594/template-as-file?page=3#dis-post-96589
My favorite for PC’s (and a linux version is coming...hopefully) is UltraEdit. It’s amazing!

Years ago when I was stuck with a Mac BBEdit was the answer. After switching to a PC I searched the world over and finally found True Love --- UltraEdit!]]>
adelgado Mar 05, 2009, 07:40 AM https://forums.modx.com/thread/17594/template-as-file?page=3#dis-post-96589
<![CDATA[Re: Template as file]]> https://forums.modx.com/thread/17594/template-as-file?page=3#dis-post-96588 I’ve struggles with edit templates in resource editor. It takes time.]]> gemu Feb 12, 2009, 07:45 AM https://forums.modx.com/thread/17594/template-as-file?page=3#dis-post-96588 <![CDATA[Re: Template as file]]> https://forums.modx.com/thread/17594/template-as-file?page=3#dis-post-96587 frippz Jan 30, 2009, 09:42 AM https://forums.modx.com/thread/17594/template-as-file?page=3#dis-post-96587 <![CDATA[Re: Template as file]]> https://forums.modx.com/thread/17594/template-as-file?page=3#dis-post-96586
i would say if your host doesnt allow files above public_html and wont let you modify htaccess, its time to find a new host.

i know we have to work on our clients sites a lot and dont have a say, but man that’s a horrible setup for a CMS there.]]>
chucktrukk Jan 30, 2009, 07:08 AM https://forums.modx.com/thread/17594/template-as-file?page=3#dis-post-96586
<![CDATA[Re: Template as file]]> https://forums.modx.com/thread/17594/template-as-file?page=3#dis-post-96585 Quote from: ChuckTrukk at Jan 30, 2009, 11:41 AM

you could also put the files above the root.

Yes... but as we stated earlier in this thread, sometimes the host doesn’t give you that option.]]>
frippz Jan 30, 2009, 05:50 AM https://forums.modx.com/thread/17594/template-as-file?page=3#dis-post-96585
<![CDATA[Re: Template as file]]> https://forums.modx.com/thread/17594/template-as-file?page=3#dis-post-96584
public_html/
public_html/assets/
templates/]]>
chucktrukk Jan 30, 2009, 05:41 AM https://forums.modx.com/thread/17594/template-as-file?page=3#dis-post-96584
<![CDATA[Re: Template as file]]> https://forums.modx.com/thread/17594/template-as-file?page=3#dis-post-96583 Quote from: dev_cw at Jan 30, 2009, 11:18 AM

That is a good solution. Thanks for posting. grin

What about storing the files on the server bellow the web level? Is that an option?
Sometimes. But some hosts only gives you access to the document root and then htaccess is the only option. The swedish host One.com is one of those.]]>
frippz Jan 30, 2009, 05:37 AM https://forums.modx.com/thread/17594/template-as-file?page=3#dis-post-96583
<![CDATA[Re: Template as file]]> https://forums.modx.com/thread/17594/template-as-file?page=3#dis-post-96582

What about storing the files on the server bellow the web level? Is that an option?]]>
dev_cw Jan 30, 2009, 05:18 AM https://forums.modx.com/thread/17594/template-as-file?page=3#dis-post-96582