I've got a question about this again.

I'm trying to add regions to my views, but I have a different file structure and I don't quite know how to get render_region to work with it.

For example, I have:
admin/help/index.html.haml (works fine)
admin/help/developing/index.html.haml (not sure how to get this to work)

I'm not quite sure how to get that working. Can this be done or does my structure need to be flattened?



On Jun 13, 2008, at 12:06 AM, Jim Gay wrote:

That was a big help Sean. Thanks.

I have the basics started with editable regions and in trying to make this extension as helpful as possible I've commented the help_extension.rb and README with details about setting up regions.

Chris, take a look if you haven't tried it yourself yet:

On an unrelated note, can anyone tell my why this line in my HAML isn't being parsed properly?
The output is as if that div is never declared.

On Jun 12, 2008, at 2:44 PM, Sean Cribbs wrote:

If you look at the way the original Shards extension modified the Radiant::AdminUI object, that should get you going in the right direction. That said, here's the gist:

1) Add an attr_accessor for your controller name to Radiant::AdminUI (class_eval is probably best).
2) Put an OpenStruct in that attribute.
3) Add Radiant::AdminUI::RegionSet objects to attributes of the ostruct that match your template names -- 'edit', 'index', etc.
4) Add your regions and partials to the RegionSets.
5) Modify your views to provide the regions and default partials. Looking at the included view templates should help.


Chris Parrish wrote:
Jim Gay wrote:
I want to add regions into the interface for radiant-help.
Is this possible? If so, can I get some pointers on how to go about that?

Ditto for Styles 'n Scripts

Radiant mailing list

Reply via email to