function forum_block_view_pre_render

Render API callback: Lists nodes based on the element's #query property.

This function can be used as a #pre_render callback.

See also

forum_block_view()

File

modules/forum/forum.module, line 719

Code

function forum_block_view_pre_render($elements) {
    $result = $elements['#query']->execute();
    if ($node_title_list = node_title_list($result)) {
        $elements['forum_list'] = $node_title_list;
        $elements['forum_more'] = array(
            '#theme' => 'more_link',
            '#url' => 'forum',
            '#title' => t('Read the latest forum topics.'),
        );
    }
    return $elements;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.