Clean HTML

avr
avr's picture
Joined: 10/14/2008

As a new Drupal user, I love the ability to create queries using Views. BUT...I haven't really enjoyed all of the extra HTML markup that gets included. On a few Drupal sites (which may or may not be using Views), their HTML code is really cut down.

Essentially, I'm hoping to cut out unnecessary class names like:

<div class="view view-featured-news view-id-featured_news view-display-id-block_1 view-dom-id-4 views-processed">

I understand that this is generated in the Views tpl files, but I don't know enough php to alter the something like:

<?php print $field->class; ?>

Especially since that's in a "foreach" statement.

I know that I can copy these files into my theme folder and make the adjustments - but is that the best method?

Thanks a ton for all of your help!

avr

G&G Podcast Host
Matt Farina's picture
Joined: 06/01/2006
Vies 2 Theming

Go into your view of choice, and select theming information. That will give you some information about how to override elements.

Most of the .tpl.php files provided by views are well documented on what you can do.

Matt Farina
Geeks and God Co-Host
www.innovatingtomorrow.net
www.mattfarina.com

Matt Farina
Geeks and God Former Co-Host
www.mattfarina.com