Adding parts the easy way (KISS-GUI)

Hey guys,

I just got into Radiant, and I’m loving the simplicity of it.

But I can already hear my end clients nagging, coz they cant remember
part names and whatelse…

well I just solved that by making a stupid simple image map popup.

thought i’d share it, as it can trastically improve end-user experience(
and maybe even yours)

only file you need to edit is /app/views/admin/page/new.rhtml

just add these 2 JS functions at the top of the page.

function toggle_help_part_popup() {
var popup = $(‘help-part-popup’);
var partNameField = $(‘part-name-field’);
center(popup);
Element.toggle(popup);
}

function put_part(frmtxt){
var partNameField = $(‘part-name-field’);
partNameField.value = frmtxt;
Element.hide(‘help-part-popup’);
}

then create the imagemap pop-up (its a div layer within the popups id)

<%= link_to_function 'Close', "Element.hide('help-part-popup')", :class => 'close-link' %>

last but not least add a link to the “add_part” popup, I placed it next
to the close tag, so it would result in the following:

<%= link_to_function 'Close', "Element.hide('add-part-popup')", :class => 'close-link' %> <%= link_to "help?", 'javascript: toggle_help_part_popup()', :title => 'help?' %>

this is totally simple, but I believe some people mind find some use for
it.

if you wanna test it out i placed the image map at
http://nexflo.net/layout_helper.png

its all pretty self explanatory I guess, but it still saves time

best,
Florian

Nifty Idea,

I wonder how we could make this more “automated” to provide some layout
information about what page parts of being used for a given arbitrary
page. (Not one using your specific layout)

Perhaps a temporary override <r:content part… could render a border
around it’s contents, and ignore content that’s not an <r:tag… and
render the name of the part with a giant H1. There could always be
cases where it gets messed up but I think it could work. Perhaps use
the facets PagePreview extension as a base.