Alright enough talk, time for some code. I’ve submitted a patch to help
alleviate all of our woes and give developers who are currently
developing
extensions and things a chance to do it on a platform that might be
viable
going forward.
http://dev.radiantcms.org:9007/radiant/ticket/79
From the patch details:
This was diff’d against the entire revision 85 trunk. There are only 2
modifications to the existing codebase but I did it against the entire
directory to make my life easier.
This is a large patch which includes 4 things that will allow developers
to
extend radiant in many ways.
-
A modified version of the engines plugin
- Engines will now load their views over the existing views in the
application - Initial support for adding routes through an Engines::Routes class
- Engines will now load their views over the existing views in the
-
A modified environment.rb that calls Engines.start to load all
engines -
A modified routes.rb that loads high priority routes using the
Engines::Routes class -
A test engine that shows how to layout a plugin and utilize the new
routes
class
This will make everyone happy, rainbows and butterflies, and only 2
lines of
code added to the existing radiant codebase.
Engines have built in support for modifying models, views, controllers,
testing,
migrations, and this version now has high priority routing.
More information about the Engines system can be found here:
If you don’t want to wait for this patch to be pushed through I have the
full
codebase with patch applied here:
http://www.besquared.net/files/radiant_engines.tar
Josh @ besquared