i would like to output dynamic generated html content instead of the translatable message but i can’t make it work:
function custom_logo_module_block_view($delta = '') {
// don't worry about switch($delta) logic
// perform some operations and then display some generated html
// (maybe use the template(...) function)
// works fine but i'd like to print html
$block['content'] = t('No content available.');
return $block;
}
how can i print out generated html into a block?
i can’t find any solutions or code examples. i think i might be pointing towards the wrong direction so best practice suggestions are welcome.
Update regarding your comments…
As far as I understand by
some resultyou mean generated data from database. In this case you can try something like this:This will give you the following output:
Or you can try:
Both of this ways are working but they are not the right ways. The right way to generate content is in my first answer. Read more about theming in Drupal.