本文整理汇总了PHP中Area::getTotalBlocksInArea方法的典型用法代码示例。如果您正苦于以下问题:PHP Area::getTotalBlocksInArea方法的具体用法?PHP Area::getTotalBlocksInArea怎么用?PHP Area::getTotalBlocksInArea使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Area
的用法示例。
在下文中一共展示了Area::getTotalBlocksInArea方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Area
$disable_page_info = true;
}
if ($pageid != 1 && $disable_page_info == 1) {
$this->inc('elements/page-meta.php');
}
?>
<?php
$a = new Area('Header Image');
$blocks = $a->getTotalBlocksInArea($c);
if ($blocks > 0 || $c->isEditMode()) {
echo '<div class="c5h-banner-wrap clearfix">';
echo ' <div class="row">';
echo ' <div class="small-12 columns">';
$a->display($c);
echo ' </div>';
echo ' </div><!-- END .row -->';
echo '</div><!-- END .c5h-banner-wrap -->';
}
?>
<?php
$a = new Area('Header Image Full');
$blocks = $a->getTotalBlocksInArea($c);
if ($blocks > 0 || $c->isEditMode()) {
echo '<div class="c5h-banner-wrap-full clearfix">';
$a->display($c);
echo '</div><!-- END .c5h-banner-wrap-full -->';
}
?>
</header>
示例2: Area
?>
<div class="spacer"></div>
<?php
if ($c->isEditMode()) {
?>
</div>
<?php
}
?>
<div id="header-area">
<div class="divider"></div>
<div id="header-area-inside">
<?php
$ah = new Area('Header');
$ah->display($c);
?>
</div>
<?php
if ($ah->getTotalBlocksInArea() > 0) {
?>
<div class="divider"></div>
<?php
}
?>
</div>
</div>
示例3: die
<?php
defined('C5_EXECUTE') or die("Access Denied.");
$this->inc('elements/header.php');
$pageHeader = new Area('Page Header');
$pageHeader->enableGridContainer();
$pageHeaderBlocks = $pageHeader->getTotalBlocksInArea($c);
$displayPageHeader = $pageHeaderBlocks > 0 || $c->isEditMode();
$pageContent = new Area('Page Content');
$pageContent->enableGridContainer();
$pageContentBlocks = $pageContent->getTotalBlocksInArea($c);
$displayPageContent = $pageContentBlocks > 0 || $c->isEditMode();
$pageFooter = new Area('Page Footer');
$pageFooter->enableGridContainer();
$pageFooterBlocks = $pageFooter->getTotalBlocksInArea($c);
$displayPageFooter = $pageFooterBlocks > 0 || $c->isEditMode();
?>
<main>
<section class="ui page header">
<?php
$pageHeader->display($c);
?>
</section>
<?php
if ($displayPageContent) {
?>
<section class="ui page content container">
<?php
$pageContent->display($c);