[drupal-devel] Improve Drupal themability
Moshe Weitzman
weitzman at tejasa.com
Thu Apr 14 13:49:12 UTC 2005
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.
More information about the drupal-devel
mailing list