Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Having produced my first custom list view, I note that the resulting HTML is very compact.
It would be nice, and more readable, if the default raw HTML could be formatted a little. Eg. Blank line between
, and
starting on a new line.
Comments
Comment #1
merlinofchaos CreditAttribution: merlinofchaos commentedPlease supply a patch, but don't actually change the actual HTML presented (doing so could break people's sites). Formatting is ok, just no functionality (i.e, tag/class/id) changes.
Comment #2
catchI think this is more a general issue with theme_item_list. I ran into an IE7 css bug due to the lack of newlines, and did this in my template.php, still mulling whether it's worth opening a minor issue against core for the same thing.
http://drupal.org/node/199861
Comment #3
iantresman CreditAttribution: iantresman commentedLooks like Views is not the cause, but the includes/theme.inc module where there is a function theme_item_list(..) that outputs the
<li>
tags in the line:$output .= '<li' . drupal_attributes($attributes) . '>'. $data .'</li>';
Unfortunately changing the code (end of line) to:
$output .= '<li' . drupal_attributes($attributes) . '>'. $data .'</li>\n';
does not work, and merely outputs the \n characters.
Comment #4
nevets CreditAttribution: nevets commentedThis would work, change
'</li>\n'
to"</li>\n"
(note use of double instead of single quotes) and it will output a newline (instead of the characters).Comment #5
iantresman CreditAttribution: iantresman commentedIt sure does, thanks.
As catch mentioned above, the reason lists are not formatted better (with trailing \n) is due to an IE explorer bug, details at:
http://csscreator.com/?q=node/6745
Comment #6
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.