List split

2 posts by 2 authors in: Forums > CMS Builder
Last Post: November 17, 2015   (RSS)

By master - November 8, 2015

I have a template that requires to do this

                    <div class="dates-wrapper">
                     <ul>
                         <li> <!-- List #1 --> <!-- max 5 Date Info elements per li -->
                             <div class="date-box"> <!-- Date Info 1 -->
                                </div> <!-- end Date Info 1 -->
                                
                                <div class="date-box"> <!-- Date Info 2 -->
                                </div> <!-- end Date Info 2 -->
                                
                                <div class="date-box"> <!-- Date Info 3 -->
                                </div> <!-- end Date Info 3 -->
                                
                                <div class="date-box"> <!-- Date Info 4 -->
                                </div> <!-- end Date Info 4 -->
                                
                                <div class="date-box"> <!-- Date Info 5 -->
                                </div> <!-- end Date Info 5 -->
                            </li>
                            
                         <li> <!-- List #2 --> <!-- max 5 Date Info elements per li -->
                             <div class="date-box"> <!-- Date Info 1 -->
                                </div> <!-- end Date Info 1 -->
                                
                                <div class="date-box"> <!-- Date Info 2 -->
                                </div> <!-- end Date Info 2 -->
                                
                                <div class="date-box"> <!-- Date Info 3 -->
                                </div> <!-- end Date Info 3 -->
                                
                                <div class="date-box"> <!-- Date Info 4 -->
                                </div> <!-- end Date Info 4 -->
                                
                                <div class="date-box"> <!-- Date Info 5 -->
                                </div> <!-- end Date Info 5 -->
                            </li>                            
                         <li> <!-- List #3 --> <!-- max 5 Date Info elements per li -->
                             <div class="date-box"> <!-- Date Info 1 -->
                                </div> <!-- end Date Info 1 -->
                                
                                <div class="date-box"> <!-- Date Info 2 -->
                                </div> <!-- end Date Info 2 -->
                                
                                <div class="date-box"> <!-- Date Info 3 -->
                                </div> <!-- end Date Info 3 -->
                                
                                <div class="date-box"> <!-- Date Info 4 -->
                                </div> <!-- end Date Info 4 -->

<div class="date-box"> <!-- Date Info 5 -->
                                </div> <!-- end Date Info 5 -->
                                
                            </li>
</ul>
                    </div>

How can I split 5 records in a <li></li> and automatically create a new <li></li> with five more records?