Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Template System
I recently tried Mephisto and loved that you could create any file you wanted within the system, say a new JS file. It would be awesome if you could do something like this in Txp. Thoughts? x
~ Cameron
Offline
Re: Template System
Then you can use mephisto ;)
But anyway, I don’t think TXP will never do these kind of things, like creating any file you want, and if does then only by plugin. Textpattern, as we know, uses MySQL-database (or compatible) for everything and that in same time provides more elegant way to handle data.
But possibly we are now talking about custom content types, which TXP could do, and somewhat can already. All you need is to upload your data to the database and then output it with your desired Content-type-headers. In example stm_javascript plugin could handle that js thingy.
Last edited by Gocom (2008-09-26 23:57:47)
Offline
Re: Template System
Ay, ay, ay… this Gocom kid… try to be nice with our mushroom friend.
driz: there are some plugins like cnk_versioning and rvm_css which will allow you to create text files from the pages, forms and txp-managed CSS.
Not sure if there is anything similar for JS files… although I’ve to admit that a something like rvm_css for JS (rvm_js?) will be something really great.
Offline
Re: Template System
That JS plugin is great, but how come that can add JS to a page using example.com/?js=myfile
where as with CSS, Textpattern does it like this: example.com/textpattern/css.php?=default
How can I stop Textpattern from adding that textpattern to the url? Why does Textpattern require a link to the css.php file, where as this plugin can just do it, using/js?=myfile
also is it possible to create the caches like you do with rvm_css
Last edited by driz (2008-09-27 11:59:10)
~ Cameron
Offline
Re: Template System
Hmm, would it be possible to imitate what rvm_css does, by copying some of the code across and changing it so that it caches all your js files into a js folder, that you can then choose in the admin panel? but i still like that you can store the js in the database. x
~ Cameron
Offline
Re: Template System
driz wrote:
That JS plugin is great, but how come that can add JS to a page using example.com/?js=myfile
where as with CSS, Textpattern does it like this: example.com/textpattern/?css=default
Different people wrote that code. That’s just how it is.
How can I stop Textpattern from adding that textpattern to the url?
Hack the code or use mod_rewrite.
also is it possible to create the caches like you do with rvm_css
Sure, one would have to write a plugin to do so. Perhaps I’ll do this myself if I have a bit of spare time or perhaps the person who originally wrote the plugin that adds the javascript tab will add caching functionality.
Offline
Re: Template System
That would be awesome, so I take it you choose the JS directory in the same admin panel as you do for the CSS?
Hopefully you’ll get chance to do to this, would be a great feature to add (in the form of a plugin) to Textpattern. Thanks. x
Last edited by driz (2008-09-27 12:19:58)
~ Cameron
Offline
Pages: 1