[wp-hackers] dynamic_content?

Foolish Visions shelly at foolishvisions.com
Mon Mar 21 14:34:05 UTC 2011


I don't know about naming conventions, but I thought I'd chime in since we're on the subject of widgets.  The biggest issue I (and several colleagues have) with the widgetized sidebars is that you cannot associate widgets with the name of the widget area you've put them in.  So if you delete an entire section (or add a new one) the widgets get all rearranged and you have to redo them all.

For example, say I have a widgetized section registered for "Home" and "Contact", and I have several widgets set to just show on the "Home" and "Contact" Pages, and use some custom code to pull only that section of widgets to the page it's named after. Now say I decide I want the stuff ion the "Home" section to just be default, so I get rid of the "Home" and all that remains is "Contact."  When you do that, you'll see that all the "Home" widgets are now in the "Contact" section, and all that was previously in "Contact" is gone (it's actually *not* - it's still in the database, but there's nothing associated with it, so you can't see them anymore until you re-register another widget area to populate it with the stuff).

Looking into it, all I've seen is that each widgetized area, when registered, is registered as "sidebar1", "sidebar2" etc. and the naming conventions given in the functions.php file (when registering the widget) are ignored - the name is basically for display purposes only.  It'd be nice, I think, if the name given - IF one is given - was used (the numerical sidebars would just be the defaults) instead, so when you move, add or delete these sections the widgets associated with them remain intact.  I think that's a more pressing issue than whether or not it's called a "sidebar widget", IMO.

That's just my 2 cents (if it's worth even that! :) )

~Shelly


More information about the wp-hackers mailing list