I've set the Wrapper HTML Element option to none, and removed any wrapper divs in the templates presented in Theme Information, but my image fields are still getting wrapped in plain divs.
2 Answers
There are several ways to strip HTML. You can under rewrite results Strip HTML tags or under style settings Customize the HTML. If you have tokens enabled you can exclude a bunch of fields then add a Global text markup field. Most of the wrapping markup will be removed and you can use the your own markup or not by typing HTML into the Global text field placing the placeholder tokens where in the HTML the field should be rendered. Another way to clean up Views markup is to create override theme templates by clicking on theme templates for the theme override template title and copying the default code changing anything you don't want in them before you save.
-
Derp. My problem was I was setting the "Customize field and label wrapper HTML" option to none, but did not notice I also needed to address "Customize field HTML".– JorenCommented Jun 22, 2011 at 22:14
-
Herp... Thanks @Joren, you probably saved me a lot of time. Commented Jun 24, 2013 at 14:26
From the looks of things, you're using D7/Views 3.x... For 2.x, there's an excellent Views companion module, Semantic Views, that enables this kind of functionality.
And, yes, it's often a bit confusing as to which setting in the Style options of a views field will turn on or off which HTML element... Hopefully the ux for that improves over time.