2

In user module, "Who's online" and "Who's new" blocks both use the user_list theme function. How can I change the markup of Who's online without any effect on Who's new's block markup?

1 Answer 1

1

Since they both use the same theme function it gets more complicated.

The only real choice you have to alter the markup of the one block, but not the other, is to template_preprocess_block or templates for the blocks. The problem is that by this point the markup for the actual block content has already been created, which means that you would either have to recreate the markup, or use some pattern matching to alter the created markup. Both of which is not really desirable.

Another option would be to create the block yourself like the user module does but alter the markup that is created.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.