Radiant Facets

The Facets model of Extensions is to break up the page editing interpace
into regions and parts.

To alter this interface you insert your “part” somewhere into this
hierarchy. Or you can re-arrange the hierarchy.

So for example you would do something like:

Radiant::PageEditorUI.add "admin/page/attributes", :region => :form,

:after => “edit_page_parts”
Radiant::PageEditorUI.add “admin/page/popups”, :region => :popups

The problem with this model is that extensions don’t always want to add
one button somewhere… sometimes we want to change the organization of
page editor. We want the freedom to write HTML. So I propose that
of making this call in activate, you instead name a partial in your
extension as the page editor. Ideally, you should be able to name this
the partial to use for only certain page types.

something like the following declaration in my extension:
Radient::PageEditorUI.define_page_editor do
| user, session, default |
if user.admin?
where define_page_editor is a core method that allows me to specify a
that can conditionally determine which page editor should be used.

The definition of this partial (my_special_admin_editor) should be to
all the built in radiant page editor partials, and override / replace /
reformat as needed

So for example you would do something like:

    <%=page_editor_render :edit_form" do %>
        <%=page_editor_render :edit_title"%>
        <%=page_editor_render :edit_extended_metadata"%>
        <%=page_editor_render :edit_page_parts"%>
            <%=render :partial => 'admin/page/attributes'%>
        <%=page_editor_render :edit_layout_and_type"%>
        <%=page_editor_render :edit_timestamp"%>
        <%=page_editor_render :edit_buttons"%>
    <% end %>
    <%=page_editor_render :edit_popups" do %>
            <%=render :partial => 'admin/page/popups'%>
    <% end %>

This would allow you to mix in all the HTML etc needed to properly
these pieces together for your particular setup. This would also give
the flexibility to solve the problems that will arise when multiple
extensions want to change the editor.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs