Make column work

The ColumnCount is set on the CompositeField class, and not on its FieldList. So to get the ColumnCount, we need to use $Top to get out of the loop.
This commit is contained in:
Alex Saelens 2018-07-04 09:48:39 +12:00 committed by GitHub
parent 00a263092e
commit fd7efba7d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,8 +4,8 @@
<% end_if %> <% end_if %>
<% loop FieldList %> <% loop FieldList %>
<% if ColumnCount %> <% if $Top.ColumnCount %>
<div class="column-{$ColumnCount} $FirstLast"> <div class="column-{$Top.ColumnCount} $FirstLast">
$SmallFieldHolder $SmallFieldHolder
</div> </div>
<% else %> <% else %>