Last active
December 17, 2015 05:08
-
-
Save danscotton/5555250 to your computer and use it in GitHub Desktop.
This file contains 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
<div class="correspondent__stories" <?= $this->next ?>> | |
<? foreach($this->stories as $story): ?> | |
<h2><?= $story['headline'] ?></h2> | |
<? endforeach; ?> | |
</div> | |
<? | |
// ... | |
$this->next = $this->getNext(); | |
private function getNext() | |
{ | |
return $this->stories->hasNextPageLink() ? sprintf('data-next="%s"', $this->stories->getNextPageLink()) : ''; | |
} | |
// ... | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
if $story is an object.....
then it can be