Example #1
0
 public function index()
 {
     $revision = \Ip\ServiceLocator::content()->getCurrentRevision();
     if ($revision) {
         return \Ip\Internal\Content\Model::generateBlock('main', $revision['revisionId'], 0, ipIsManagementState());
     } else {
         return '';
     }
 }
Example #2
0
 public function pageNotFound()
 {
     $content = null;
     $error404Page = ipContent()->getPageByAlias('error404');
     if ($error404Page) {
         $revision = \Ip\Internal\Revision::getPublishedRevision($error404Page->getId());
         $content = \Ip\Internal\Content\Model::generateBlock('main', $revision['revisionId'], 0, 0);
     }
     return new \Ip\Response\PageNotFound($content);
 }
Example #3
0
 private function generateBlockHtml($revisionId)
 {
     $predefinedContent = \Ip\ServiceLocator::content()->getBlockContent($this->name);
     if ($predefinedContent !== null) {
         return $predefinedContent;
     }
     if (ipContent()->getCurrentPage() == null && $revisionId == 0 && !$this->isStatic) {
         return '';
     }
     if ($this->isStatic) {
         $languageId = ipContent()->getCurrentLanguage()->getId();
         $revisionId = 0;
     } else {
         if ($revisionId === 0) {
             $revision = \Ip\ServiceLocator::content()->getCurrentRevision();
             if ($revision) {
                 $revisionId = $revision['revisionId'];
             }
         }
         $languageId = 0;
     }
     return \Ip\Internal\Content\Model::generateBlock($this->name, $revisionId, $languageId, ipIsManagementState(), $this->exampleContent);
 }
Example #4
0
    ?>
                    <article <?php 
    if (ipIsManagementState()) {
        echo 'title="' . $tile['label'] . '"';
    }
    ?>
                        class="col-md-4 isotopeItem <?php 
    echo $widgetId . 'all';
    foreach ($tile['filters'] as $f) {
        echo ' ' . $widgetId . $f['filter'];
    }
    ?>
">
				        <div>
                            <?php 
    echo \Ip\Internal\Content\Model::generateBlock('portfolio' . $originalWidgetId . '-' . $tile['blockId'], $revisionId, 0, ipIsManagementState());
    ?>
                        </div>
                    </article>
                <?php 
}
?>
                							  
            </div>
        </div>
    </div>
</div>

<?php 
$portfolioJsScript = '