[development] Module Idea for Feedback: Select Option Values

Idan Arbel idan at arbel-designs.com
Thu Jan 28 13:09:27 UTC 2010


How about using taxonomy for select lists?

 

Idan

 

From: development-bounces at drupal.org [mailto:development-bounces at drupal.org]
On Behalf Of Shai Gluskin
Sent: Thursday, January 28, 2010 3:04 PM
To: development at drupal.org
Subject: [development] Module Idea for Feedback: Select Option Values

 

Development Peeps,

 

I'm thinking of a module called: Select Option Values

 

It would pull out part of CCK's text.module functionality from
admin/content/node-type/<type machine name>/fields/field_<field name> and
put it on its own admin page with it's own permission. The problem with the
location of the setting, as it is now, is that you have to have "administer
content-type" permissions in order to get there and that is something rarely
given to a client, at least in my experience.

 

But the allowed values maintenance for a select list is something I want to
give over to client content-editors/admins.

 

My current workaround is that I designate the body field of a particular
unpublished node for that purpose and provide a link to it in a the custom
admin area I typically build for site editors.

 

I put the following code in the "Advanced usage only: PHP code that returns
a keyed array of allowed values.":

$node = node_load(17); // Replace "17" with node id of node containing
options.

$body = strip_tags(str_replace("\r\n","~",trim($node->body)));

$arr = explode("~",$body);

return drupal_map_assoc($arr);

 

That work-around is okay, but it does feel like a work-around better solved
by a module.

 

Does this exist and I didn't find it? Is it needed in your estimation?

 

Shai

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20100128/b673d3e0/attachment.html 


More information about the development mailing list