On 25 Aug 2008, at 14:13, Arik Jones wrote:

Andrew Neil wrote:
The file_system extension exists for this purpose. Check it out:

http://github.com/nelstrom/radiant-file-system-extension/tree/master

I should warn you that it is still under development, so if you do use
it, take care! I would appreciate feedback on any problems you
encounter.

Drew

Does this jive with the Styles N' Scripts extension? If so, I think
you've solved a really large problem for me.

Not yet. That was the first question to be asked when I announced this extension:

        http://www.ruby-forum.com/topic/152887#709163

so I can probably say it tops the list of desired features. Sean answered the Q in the same thread.

Sean designed the extension for the Redken site, which included a couple of additional models. I have basically taken Sean's extension and stripped out all of the Redken specific functionality. If you look at the extension as it was when I first checked it in to github:

        
http://github.com/nelstrom/radiant-file-system-extension/commit/cf20284c13f3a43d00408086e628c2c13337380c

you can get an idea for what Sean means when he says "you can just create an appropriately named module". In particular, I draw your attention to the files:

        /lib/file_system/model/part_type_extensions.rb
        /lib/file_system/model/template_extensions.rb

These files describe the save and load functionality for PartType and Template models. I have discarded them, because the corresponding models were custom built for Redken. On the other hand, I have maintained the page_extensions.rb file, because the Page model is part of Radiant core.

I think it would be quite straightforward to add the functionality in a similar fashion for 'text-assets' such as stylesheets and javascript files. If I understand Sean's design correctly, I think his intention was that extension authors could make their custom models play with the FileSystem extension by adding modules such as (using SnS as an example):

        /lib/file_system/model/stylesheet_extensions.rb
        /lib/file_system/model/javascript_extensions.rb

These modules would be added to the SnS extension itself, rather than in the FileSystem extension. If you had SnS installed without FileSystem extension these modules would do nothing, but if you had both extensions installed, then FS would pick up the extra functionality provided by those modules in the SnS extension. (It might be necessary to specify the load order of file_system extension before the others)

I'm offering these pointers to help anyone get started on this who wants it. I have my plate full just now (and a vacation as of next week) so I won't be able to have a go at this myself for at least a month.

Cheers,
Drew
_______________________________________________
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to