Jim,
Right now it's based completely on controller and template name. So if
'developing' is another controller, you're fine. Otherwise, it would
require a major shift in the way that RegionSets are determined.
However, you can override the controller name and template name by
setting the appropriate instance variables @controller_name,
@template_name, or even @region_set. Have a look at
Admin::RegionsHelper#lazy_initialize_region_set.
Sean
Jim Gay wrote:
Sean,
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?
Thanks
-Jim
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:
http://github.com/saturnflyer/radiant-help/tree/master/help_extension.rb
On an unrelated note, can anyone tell my why this line in my HAML
isn't being parsed properly?
http://github.com/saturnflyer/radiant-help/tree/master/app/views/admin/help/index.html.haml#L36
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.
Sean
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?
-Jim
Ditto for Styles 'n Scripts
-Chris
_______________________________________________
Radiant mailing list
Post: [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site: http://lists.radiantcms.org/mailman/listinfo/radiant
_______________________________________________
Radiant mailing list
Post: [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site: http://lists.radiantcms.org/mailman/listinfo/radiant