From 84033c009c2e7072e3f14547068b5a77f81700ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Auswo=CC=88ger?= Date: Tue, 5 Nov 2013 15:36:20 +0100 Subject: [PATCH] Added -first-row CSS class for columns --- src/MadeYourDay/Contao/Element/CustomElement.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/MadeYourDay/Contao/Element/CustomElement.php b/src/MadeYourDay/Contao/Element/CustomElement.php index b7eba67..09a9642 100644 --- a/src/MadeYourDay/Contao/Element/CustomElement.php +++ b/src/MadeYourDay/Contao/Element/CustomElement.php @@ -201,8 +201,11 @@ public function getColumnClassName($index) $config = ColumnsStart::getColumnsConfiguration($this->arrData); $classes = array('rs-column'); - foreach ($config as $media) { + foreach ($config as $name => $media) { $classes = array_merge($classes, $media[$index % count($media)]); + if ($index < count($media)) { + $classes[] = '-' . $name . '-first-row'; + } } return implode(' ', $classes);