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

merlinofchaos’s picture

Please 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.

catch’s picture

I 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

iantresman’s picture

Status: Active » Fixed

Looks 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.

nevets’s picture

This 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).

iantresman’s picture

It 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

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.