When working with a CMS, which template should classes for container vs item be in?

  • Page Owner: Not Set
  • Last Reviewed: 2019-11-20

If I'm working on a site that has lists of items in the same row, which template should my classes be pulling from? In the examples I'll use a News List and News Items

Option 1

// News List template
<div class=row> 
  foreach NewItems {
    <div class=col-xs-4>
      renderItem
    </div>
   }
</div>

// News Item Template
<div>
  content
</div>

Option 2

// News List template
<div class=row> 
  foreach NewItems {
    renderItem
   }
</div>

// News Item Template
<div class=col-xs-4>
  content
</div>

Or is there a third option?