Hi all,
maybe is a well know issue but I would like to report this, ragarding the function theme_item_list()
Here is the Drupal 7 theme_item_list() function.
in particular, this is the way it manipulate the 'title' key:
if (isset($title) && $title !== '') {
$output .= '<h3>' . $title . '</h3>';
}
in bootstrap, however, this is the way the function bootstrap_item_list() deals with 'title', line 173 of includes/theme.inc:
if (isset($title)) {
$output .= '<h3>' . $title . '</h3>';
}
This way, if I set something like this:
$output = theme('item_list', array('items' => $items,
'title' => '',
'type' => 'ul',
'attributes' => $attributes
));
The ouptut will result in a empty <h3>
tag. This problem can be fixed simply by not set the 'title' key. However it creates a bit of confusion with the usage of the global function.
I suggest to change line 173 of the bootstrap/includes/theme.inc in:
if (isset($title) && $title !== '') {
Comment | File | Size | Author |
---|---|---|---|
#2 | bootstrap-item-list-2040629-1.patch | 736 bytes | Tubia87 |
Comments
Comment #0.0
Tubia87 CreditAttribution: Tubia87 commentedwrong markup in the text
Comment #1
markhalliwellPlease submit a patch.
Comment #2
Tubia87 CreditAttribution: Tubia87 commentedHi,
I submit here the patch.
Sorry for the delay, but this is my first patch so I have to study how to do that :)
Hope it will be useful, 'though bootstrap version 3 is out!
Comment #3
Tubia87 CreditAttribution: Tubia87 commentedComment #4
danillonunes CreditAttribution: danillonunes commentedPatch tested and works as expected.
Comment #5
markhalliwellCan we just do a simple:
if (!empty($title)) {
here instead?Comment #5.0
markhalliwelladded D7 API url
Comment #6
markhalliwellThis issue has been closed while cleaning up the issue queue. This has likely already been fixed in 7.x-3.x. If it has not, please create a new issue describing the exact issue with that version. The 7.x-2.x branch currently only receives security fixes.