In the blocks generated by the module, the output looks really out of place with large sub-titles within the blocks.

i.e. you have the block title which looks normal for example: "My Relationships" block
Then within the block you have "Friends" in massive letters as a subtitle.

Please can somebody tell me how I can affect the output of these subtitles.

Thanks.

Comments

jaydub’s picture

The output for the block in question is generated by the template user_relationships-block.tpl.php in the directory user_relationship_blocks/templates in the user_relationships module directory. This template generates the list of relationships and users via sending the array of said data to the theme function theme('item_list'). Said code is shown below:

  foreach ($rows as $title => $users) {
    $output[] = theme('item_list', ($rtid == UR_BLOCK_ALL_TYPES ? array($users) : $users), $showing_all_types ? $title : NULL);
  }

The default theme function as described in http://api.drupal.org/api/function/theme_item_list/6 shows that if the theme function is passed a 2nd parameter then that string is used as the title for the ordered/unordered list that follows. This title string is displayed using <h3> tags in this default implementation.

To change the output you are seeing there are a couple of ways you could do it. You could add a CSS rule for the <h3> tag in the block, you could override the theme_item_list function with your own version in your theme and change the use of <h3> for the optional title parameter. You could create your own user_relationships-block.tpl.php file in your theme directory and generate whatever output for the block you want (see #361657: Copying user_template.tpl.php into theme folder, breaks user_relationships module. for another related theme question).

dRaz’s picture

Really useful response thank you very much.

jaydub’s picture

Status: Active » Closed (fixed)