div.ccm-block-arrange, div.ccm-block
public function on_page_view() { $bt = BlockType::getByHandle($this->btHandle); $uh = Loader::helper('concrete/urls'); $this->addHeaderItem('<link rel="stylesheet" type="text/css" href="'. $uh->getBlockTypeAssetsURL($bt, 'grid.css') .'" />'); }
div.ccm-block-arrange, div.ccm-block { width: 165px; float: left; }
<? defined('C5_EXECUTE') or die(_("Access Denied.")); ?> <div class="my-custom-block-wrapper"> <div class="grid-col-container"> <div class="grid-thumb-container"> <?php echo "<img src=\"" . $controller->getFileObject()->getURL() . "\" alt=\"\">"; ?> </div> <div class="grid-info-container"> <? echo "<p class=\"grid-title\">" .nl2br($controller->description) ."</p>"; ?> <a href="<?php print $anchor?>" class="grid-act"></a> </div> </div> </div>
div.my-custom-block-wrapper { width: 165px; float: left; }
.grid-col-container { height: 330px; width: 164px; border-right: 1px solid #fff; border-bottom: 1px solid #fff; float: left; } .grid-thumb-container { height: 165px; width: 164px; float: left; } .grid-info-container { position: relative; height: 165px;
<?php if ($c->isEditMode()) { ?> <div style="height: 335px; width: 165px; float: left;"> <?php } ?> <?php $a = new Area('Grid Item 1'); $a->display($c); ?> <?php if ($c->isEditMode()) { ?> </div> <?php } ?>
<? Loader::block('library_file'); defined('C5_EXECUTE') or die(_("Access Denied.")); class GridItemBlockController extends BlockController { protected $btInterfaceWidth = 400; protected $btInterfaceHeight = 300; protected $btTable = 'btGridItem'; $b = $this->getBlockObject(); $btID = $b->getBlockTypeID(); $bt = BlockType::getByID($btID); $this->addHeaderItem('<style>#b'. $bt .'-84 {width: 165px; float: left;}</style>'); /** * Used for localization. If we want to localize the name/description we have to include this */ public function getBlockTypeDescription() {
b674-347 <? Loader::block('library_file'); defined('C5_EXECUTE') or die(_("Access Denied.")); class GridItemBlockController extends BlockController { protected $btInterfaceWidth = 400; protected $btInterfaceHeight = 300; protected $btTable = 'btGridItem'; /** * Used for localization. If we want to localize the name/description we have to include this */ public function getBlockTypeDescription() { return t("Adds item to the grid page."); } public function getBlockTypeName() {
In that area there is a tab for css. You can create a little style however you like in your style sheet and just apply it to that block in this area.
Give it a go...
Nige