Skip to content

Instantly share code, notes, and snippets.

@davidmars
Created September 4, 2014 07:18
Show Gist options
  • Save davidmars/7d1e55f6aa804f8ae7b1 to your computer and use it in GitHub Desktop.
Save davidmars/7d1e55f6aa804f8ae7b1 to your computer and use it in GitHub Desktop.
A POV block to manage a post list
<?php
/* @var View $this */
/* @var VV_block $vv */
/** @noinspection PhpUndefinedVariableInspection */
$vv = $_vars;
/** @var VV_post[] $pages */
$pages=$vv->fieldUidsValue("pages");
?>
<!--posts-list-->
<div class="container">
<?if(TheHuman::isAdmin()):?>
<div>
<?=$vv->wysiwyg()->recordsListEditorButton("pages","R_post")?>
</div>
<?endif?>
<div>
<?foreach($pages as $page):?>
<div>
<h2><?=$page->humanTitle()?></h2>
<?=$page->getLink()->html()?>
</div>
<?endforeach?>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment