# Adding parts the easy way (KISS-GUI)

**URL:** <https://www.ruby-forum.com/t/adding-parts-the-easy-way-kiss-gui/86464>\
**Category:** Radiant CMS\
**Created:** [February 22, 2007, 2:09pm UTC](https://www.ruby-forum.com/t/adding-parts-the-easy-way-kiss-gui/86464 "2007-02-22T14:09:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nexflo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/58956e/32.png) [@nexflo](https://www.ruby-forum.com/u/nexflo)\
**Post date:** [February 22, 2007, 2:09pm UTC](https://www.ruby-forum.com/t/adding-parts-the-easy-way-kiss-gui/86464/1 "2007-02-22T14:09:00Z")

</div>

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)

 ![](https://www.ruby-forum.com/images/content/layout_helper.png) \<%= 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](http://nexflo.net/layout_helper.png)

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

best,  
Florian

---

<div class="post-metadata">

**Author:** ![nexflo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/58956e/32.png) [@nexflo](https://www.ruby-forum.com/u/nexflo)\
**Post date:** [February 22, 2007, 3:42pm UTC](https://www.ruby-forum.com/t/adding-parts-the-easy-way-kiss-gui/86464/2 "2007-02-22T15:42:55Z")

</div>

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.
