Created
September 4, 2014 07:18
-
-
Save davidmars/7d1e55f6aa804f8ae7b1 to your computer and use it in GitHub Desktop.
A POV block to manage a post list
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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