Adam Williams wrote:
> 
> I would point you to the work I was doing during RailsConf: http://
> dev.radiantcms.org/svn/radiant/trunk/extensions/forms. There is a
> file in there, lib/forms/tags.rb, which shows how one can do anything
> with Rails view helpers in Radiant tags. Be sure to also look at the
> files lib/ext/page.rb and lib/ext/site_controller.rb, as some
> modifications to Radiant were necessary, which I expect to push back
> into core.
> 

Very nice, this is a big step in the right direction. To make things 
truly DRY for an AJAX application though, this should be combined with 
the ability to render snippets from an extension controller. I mentioned 
this in my post above, and Radiant on Rails allows this, but without tag 
processing/expansion. AJAX responses are dynamic content, so without the 
ability to use tags, controllers will still have to rely on regular 
app/view partials for responses, instead of snippets that can be 
customized by the CMS user.

For now I guess I'll use these helpers in a tag to generate some 
javascript that will load the dynamic content from my controller/view 
with the page load. I suppose I could have done that without these 
helpers, but they should make it cleaner and easier. This solution will 
have to load some kind of default view if the user doesn't have 
javascript though, so it still won't be totally DRY as non-javascript 
users will have their content generated through tags and not the 
controller/view.

But I won't need two sets of layouts now, just the ones entered into 
Radiant, so it it will be safe for the CMS user to tweak that without 
controller/view portions of the site going out of sync.

Helpful, thanks.

-Lindsay

-- 
Posted via http://www.ruby-forum.com/.
_______________________________________________
Radiant mailing list
Post:   [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to