Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-09-26 23:03:33

driz
Member
From: Huddersfield, UK
Registered: 2008-03-18
Posts: 441
Website

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

#2 2008-09-26 23:51:40

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

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

#3 2008-09-26 23:59:13

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

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.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#4 2008-09-27 11:37:53

driz
Member
From: Huddersfield, UK
Registered: 2008-03-18
Posts: 441
Website

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

#5 2008-09-27 11:44:27

driz
Member
From: Huddersfield, UK
Registered: 2008-03-18
Posts: 441
Website

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

#6 2008-09-27 11:59:32

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

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

#7 2008-09-27 12:19:37

driz
Member
From: Huddersfield, UK
Registered: 2008-03-18
Posts: 441
Website

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

Board footer

Powered by FluxBB