It just so happens that I was playing around with getting the
file_system extension to work with SNS when I came across a nasty
conflict. It seems that SNS uses the attribute "filename" instead of
name. Because the file_system extension uses this as well, it leads to
all sorts of nasty issues.
If you change the attribute to 'name' (or anything else for that
matter), then everything works nicely. But I can't figure out how to
reset the filename attribute in the class extension and keep the whole
thing working. Maybe Chris will be kind enough to change the filename
attribute in sns or someone else has an idea. It would be great to get
these two plugins working together!
Keith
On Aug 25, 2008, at 4:35 PM, Sean Cribbs wrote:
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)
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'
end
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: [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site: http://lists.radiantcms.org/mailman/listinfo/radiant