Radiant AdminUI gotcha

If you are working on a Radiant extension and, trying to use the render_region method, you encounter a NoMethodError like this:

undefined method `foo' for #<Radiant::AdminUI:0x3dacdf4>

Then this is what you are hitting:

http://groups.google.com/group/radiantcms-dev/browse_thread/thread/d6fc1d385e17ae5f/cbe2ff5f4846c31f?#cbe2ff5f4846c31f

It took me a while to find this out, so: you should only use the render_region method when you want to make it possible for other extensions to inject new content in your views. This makes sense for extensions like the dashboard extension, but in most cases you do not need this functionality.

If you do want to be able to use region sets, you need to extend Radiant::AdminUI like so:

http://github.com/saturnflyer/radiant-dashboard-extension/blob/4ac14f23d5ed7f518e442121b26172008b0e0a52/dashboard_extension.rb#L44-L55

Another way to do it can be found in the paperclipped extension:

http://github.com/kbingman/paperclipped/blob/master/lib/assets_admin_ui.rb and

http://github.com/kbingman/paperclipped/blob/cf86170b2960dcc80aca9b3f89e12e688a3cd007/paperclipped_extension.rb#L31-L32

In a reading mood?

Have something to add?



  • (required, but not displayed)

  • (optional)

About this article

You’re reading an entry titled “Radiant AdminUI gotcha”. Written

undefined tag `time_ago_in_words'
ago (04/05/2010) — and archived under . So far, 0 people (dis)agreed with me, what do you think?

What the fuzz is all about

  1. 2 pages are tagged with WYM
  2. 1 page is tagged with absolute-urls
  3. 1 page is tagged with arrrrcamp
  4. 2 pages are tagged with documentation
  5. 2 pages are tagged with editor
  6. 2 pages are tagged with extension
  7. 2 pages are tagged with extensions
  8. 1 page is tagged with minitorial
  9. 1 page is tagged with navigation
  10. 10 pages are tagged with radiant
  11. 4 pages are tagged with rails
  12. 2 pages are tagged with ruby
  13. 2 pages are tagged with shell
  14. 1 page is tagged with sifr
  15. 2 pages are tagged with troubleshooting

Github activity

More places where you can find me

Back to top