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):


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)

The only thing extra you would need to do is to test for the existence of the FileSystemExtension and then add your models to its list:

if defined?(FileSystemExtension)
 FileSystem::MODELS << 'Stylesheet' << 'Javascript'

Then the extension will pick up those models, add the basic functionality and attempt to add their specialized modules as well.

The extension is very helpful when you are working on a big site, or one that you want to manipulate significantly offline. I'd call the support for Pages shaky at best, and I'd still recommend manipulating those in the regular interface. However, the other models -- snippets, layouts -- are very simple and easy to manipulate in the filesystem.

Thanks, Drew, for offering to maintain this extension!

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