I'm using a view to display articles, I want to see views row classes in the code, like this:

div class="views-row views-row-1 views-row-odd views-row-first

But for some reason the rendered code is missing these row-specific div wrappers and just shows the nodes like this:

div id="node-4" class="node node-article"

Even more frustrating, the code in the views PREVIEW shows the desired views row classes div class="views-row views-row-1" but those div wrappers don't appear in the rendered site code.

On the last site I made, the views-row classes appeared automatically. Now for some reason they're not appearing. I've been frantically googling and pulling my hair out for two days on this so any help you could provide would be greatly appreciated :-)

  • Is this a default Drupal theme ? Can you tell us which theme you're using and provide a views export ?
    – tenken
    Commented Aug 16, 2013 at 20:07
  • Thanks for the quick reply tenken... I'm using a contrib theme called CorporateClean
    – Kyle
    Commented Aug 16, 2013 at 20:17
  • Not sure how to do a views export
    – Kyle
    Commented Aug 16, 2013 at 20:17
  • would seeing the actual website help?
    – Kyle
    Commented Aug 16, 2013 at 20:19

2 Answers 2


Did you check:

  1. Template (*.tpl.php file) override. I am not sure if preview shows template overrides.
  2. Template.php for altering hooks
  3. Contrib modules for altering hooks
  • sorry if I sound like a dummy, but how would I override the .tpl.php file and which one would I override? Thanks for your help majeklch
    – Kyle
    Commented Aug 16, 2013 at 20:22
  • Could you post a screenshot of views settings?
    – majkelch
    Commented Aug 16, 2013 at 20:27
  • kylelewisdesign.com/viewsettings.png
    – Kyle
    Commented Aug 16, 2013 at 20:36
  • My guess is, that your problems are because of this: "The selected style or row format does not utilize fields." So Drupal displays node teasers and doesn't add views row classes. Please check your settings in Format box above Fields.
    – majkelch
    Commented Aug 16, 2013 at 20:43

Copy-pasting a core template into my theme helped resolve this issue:

cp ../../core/modules/views/templates/views-view-unformatted.html.twig \

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.