diff --git a/lib/QUI/Bricks/Controls/SideBox3TitleTop.html b/lib/QUI/Bricks/Controls/SideBox3TitleTop.html new file mode 100644 index 0000000000000000000000000000000000000000..dd9b9aff1ffbc28ec18bdf680ef2015187e1662d --- /dev/null +++ b/lib/QUI/Bricks/Controls/SideBox3TitleTop.html @@ -0,0 +1,55 @@ + +{if $this->getAttribute('header-title') && $this->getAttribute('header-short')} +<header> + <h2>{$this->getAttribute('header-title')}</h2> + <p>{$this->getAttribute('header-short')}</p> +</header> +{/if} + +<div class="{$this->getAttribute('grid-class-row')}"> + + {foreach from=$children item=Site key=key} + <article class="{$this->getAttribute('grid-class-article')}"> + {if $this->getAttribute( 'showTitle' ) || $this->getAttribute( 'showShort' )} + <header> + {if $this->getAttribute( 'showTitle' )} + <h3> + <a href="{url site=$Site}"> + {$Site->getAttribute('title')} + </a> + </h3> + {/if} + </header> + {/if} + + {if $this->getAttribute( 'showImage' )} + <a href="{url site=$Site}" class="image"> + {image src=$Site->getAttribute('image_site') width=640} + </a> + {/if} + + {if $this->getAttribute( 'showShort' )} + <p> + {text_passage text=$Site->getAttribute('short') start=0 end=120 striphtml=true append="..."} + </p> + {/if} + + {if $this->getAttribute( 'showContent' )} + {$Site->getAttribute('content')} + {/if} + + <footer> + <a href="{url site=$Site}" class="button"> + {locale group="quiqqer/bricks" var="continue.reading"} + </a> + </footer> + </article> + + {assign var=modKey value=$key+1} + {if $modKey && $modKey % 3 === 0} + </div> + <div class="{$this->getAttribute('grid-class-row')}"> + {/if} + + {/foreach} +</div> diff --git a/lib/QUI/Bricks/Controls/SideBox3TitleTop.php b/lib/QUI/Bricks/Controls/SideBox3TitleTop.php new file mode 100644 index 0000000000000000000000000000000000000000..ba1e95e63cee0c1168ab2a9791b79dde875506c3 --- /dev/null +++ b/lib/QUI/Bricks/Controls/SideBox3TitleTop.php @@ -0,0 +1,48 @@ +<?php + +/** + * This file contains QUI\Bricks\Controls\SideBox3TitleTop + */ + +namespace QUI\Bricks\Controls; + +use QUI; + +/** + * Class SocialBox + * + * @package quiqqer/bricks + */ +class SideBox3TitleTop extends QUI\Bricks\Controls\SideBox3 +{ + /** + * (non-PHPdoc) + * + * @see \QUI\Control::create() + */ + public function getBody() + { + $Engine = QUI::getTemplateManager()->getEngine(); + $limit = $this->getAttribute('limit'); + + if (!$limit) { + $limit = 2; + } + + $children = QUI\Projects\Site\Utils::getSitesByInputList( + $this->_getProject(), + $this->getAttribute('site'), + array( + 'limit' => $limit, + 'order' => 'release_from DESC' + ) + ); + + $Engine->assign(array( + 'this' => $this, + 'children' => $children + )); + + return $Engine->fetch(dirname(__FILE__).'/SideBox3TitleTop.html'); + } +}