Ejemplo n.º 1
0
 /**
  * @see	\cms\system\content\type\AbstractStructureContentType::getChildCSSClasses()
  */
 public function getChildCSSClasses(Content $content)
 {
     $parent = $content->getParentContent();
     if ($parent->width != "") {
         $width = array(substr($parent->width, 0, 2), substr($parent->width, 2, 2));
     } else {
         $width = array(50, 50);
     }
     $width = $content->showOrder % 2 == 1 ? $width[0] : $width[1];
     return 'grid grid' . $width;
 }
 /**
  * @see	\cms\system\content\type\AbstractStructureContentType::getChildCSSClasses()
  */
 public function getChildCSSClasses(Content $content)
 {
     $parent = $content->getParentContent();
     if ($parent->width != "") {
         $width = array(substr($parent->width, 0, 2), substr($parent->width, 2, 2), substr($parent->width, 4, 2));
     } else {
         $width = array(33, 33, 33);
     }
     switch ($content->showOrder % 3) {
         case 0:
             $gridWidth = $width[2];
             break;
         case 1:
             $gridWidth = $width[0];
             break;
         case 2:
             $gridWidth = $width[1];
             break;
     }
     return 'grid grid' . $gridWidth;
 }