From 9f7bee180ac240225e5ff4401f4dde44e41f418c Mon Sep 17 00:00:00 2001
From: Campii <dominik.chrzanowski183@gmail.com>
Date: Wed, 16 Mar 2022 10:04:42 +0100
Subject: [PATCH] feat: Added new attribute (limit) [Timeline]
 quiqqer/timeline#1

---
 src/QUI/Timeline/Controls/Timeline.php | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/QUI/Timeline/Controls/Timeline.php b/src/QUI/Timeline/Controls/Timeline.php
index 57bcf57..b54ebc7 100644
--- a/src/QUI/Timeline/Controls/Timeline.php
+++ b/src/QUI/Timeline/Controls/Timeline.php
@@ -38,7 +38,8 @@ public function __construct($attributes = array())
             'displayCss'      => false,
             'itemtype'        => 'http://schema.org/ItemList',
             'child-itemtype'  => 'https://schema.org/ListItem',
-            'child-itemprop'  => 'itemListElement'
+            'child-itemprop'  => 'itemListElement',
+            'limit'           => 10
         ));
 
         parent::__construct($attributes);
@@ -73,7 +74,8 @@ public function getBody()
             // for bricks
             $children = Utils::getSitesByInputList($Project, $parents, array(
                 'where' => $where,
-                'order' => $this->getAttribute('order')
+                'order' => $this->getAttribute('order'),
+                'limit' => $this->getAttribute('limit')
             ));
         } else {
             // for site types
@@ -88,7 +90,7 @@ public function getBody()
             'Project'   => $this->getProject(),
             'children'  => $children,
             'showLinks' => $this->getAttribute('showLinks'),
-            'imageFit' => $this->getAttribute('imageFit')
+            'imageFit'  => $this->getAttribute('imageFit')
         ));
 
         // load custom template (if set)
-- 
GitLab