2017 © Pedro Peláez
 

silverstripe-vendormodule silverstripe-columnedlist

An SS_ListDecorator to facilitate stacking data vertically in columns

image

kinglozzer/silverstripe-columnedlist

An SS_ListDecorator to facilitate stacking data vertically in columns

  • Thursday, November 9, 2017
  • by kinglozzer
  • Repository
  • 1 Watchers
  • 6 Stars
  • 286 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

ColumnedList

Build Status Latest Stable Version Total Downloads License, (*1)

An SS_ListDecorator to facilitate stacking data vertically in columns. Supports left and right “weighting”., (*2)

Example:

use Kinglozzer\SilverStripeColumnedList\ColumnedList;
use SilverStripe\CMS\Model\SiteTree;

class Page extends SiteTree
{
    public function ColumnData()
    {
        return ColumnedList::create($this->SomeDataList());
    }
}
<% loop ColumnData.Stacked(3) %>
    <div style="float: left">
        <h3>Column {$Pos}</h3>
        <ul>
            <% loop Children %>
                <li>Item {$Pos}</li>
            <% end_loop %>
        </ul>
    </div>
<% end_loop %>

Assuming SomeDataList() contains 5 items, the output would be:, (*3)

Column 1 Column 2 Column 3
Item 1 Item 3 Item 5
Item 2 Item 4 .

“Right-heavy” stacking:

Using the same above example:, (*4)

<% loop ColumnData.Stacked(3, 'Children', 0) %>
    <div style="float: left">
        <h3>Column {$Pos}</h3>
        <ul>
            <% loop Children %>
                <li>Item {$Pos}</li>
            <% end_loop %>
        </ul>
    </div>
<% end_loop %>

Assuming SomeDataList() contains 5 items, the output would be:, (*5)

Column 1 Column 2 Column 3
Item 1 Item 2 Item 4
. Item 3 Item 5

The Versions

09/11 2017

dev-master

9999999-dev https://github.com/kinglozzer/silverstripe-columnedlist

An SS_ListDecorator to facilitate stacking data vertically in columns

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

silverstripe list datalist arraylist columns columned stacking arraydata

09/11 2017

2.0.0

2.0.0.0 https://github.com/kinglozzer/silverstripe-columnedlist

An SS_ListDecorator to facilitate stacking data vertically in columns

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

silverstripe list datalist arraylist columns columned stacking arraydata

13/07 2017

1.x-dev

1.9999999.9999999.9999999-dev https://github.com/kinglozzer/silverstripe-columnedlist

An SS_ListDecorator to facilitate stacking data vertically in columns

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe list datalist arraylist columns columned stacking arraydata

12/01 2015

1.0.1

1.0.1.0 https://github.com/kinglozzer/silverstripe-columnedlist

An SS_ListDecorator to facilitate stacking data vertically in columns

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe list datalist arraylist columns columned stacking arraydata

24/07 2014

1.0.0

1.0.0.0 https://github.com/kinglozzer/silverstripe-columnedlist

An SS_ListDecorator to facilitate stacking data vertically in columns

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe list datalist arraylist columns columned stacking arraydata