[drupal-devel] Improve Drupal themability

Stefan Nagtegaal Drupal-Devel at iStyledThis.nl
Thu Apr 14 14:33:14 UTC 2005

Op 14-apr-05 om 15:47 heeft Moshe Weitzman het volgende geschreven:

> Stefan Nagtegaal wrote:
>> Op 14-apr-05 om 15:34 heeft Moshe Weitzman het volgende geschreven:
>>> We already have theme_item_list(). If you need more features from 
>>> it, please submit a patch.
>>>> about theme_status_messages(), theme_node_list().
>>> theme_node_list() and theme_user_list() are useful wrapper functions 
>>> for theme_item_list(). They are useful because the themer themer 
>>> knows what type of data he is dealing with and can universally style 
>>> accordingly. Consider prefixing all blog posts with a special icon, 
>>> or prefixing every user with an online/offline indicator. That is 
>>> easy to do today but would be hard if you you go to a your proposed 
>>> scheme.
>> Why would that be hard? Every block has a unique id..
> Um, I have to find out all those IDs. And when I add a new module, I 
> have to know that its block or page has a user list and add that to my 
> stylesheet. theme_user_list() allows the themer to once and for all 
> define how a user list should be displayed. Considering that your 
> theme expert is sometimes unavailable after the site is launched, I 
> think the theme function approach is worthwhile.
> Note that these 2 approaches are not incompatible. Everything runs 
> through theme_item_list() today. So just add your proposed logic 
> there. I just want to refute your notion that theme_node_list() and 
> its friends would be deprecated by your proposed change. They won't 
> be.

Don't forget that the classes do _not_ have to be unique so the classes 
will stay to theme things the way it was.. But, I am only introducing 
an required id to the <ul> which let us do the same as we did before on 
the surrounding <div>.

Maybe it's

More information about the drupal-devel mailing list