Ejemplo n.º 1
0
<section>
    <?php 
// BUILD OUR PAGE CONTENT
// obtain/receive all content areas ($areaArray)
// get them in ORDER
// every page gets all content areas (they may be empty)
// so I do not need to tie to current page
$areaArray = ContentAreaClass::retrieveDivs();
foreach ($areaArray as $area) {
    // all of our content areas are DIVs
    echo "<div id='" . $area->getDivName() . "'>";
    // obtain/receive all articles ($articleArray)
    // for the current page (or for all pages)
    // and for the current area
    // in REVERSE ORDER of creation date
    $articleArray = ArticleClass::getAreaArticles($_GET['page'], $area->getId());
    foreach ($articleArray as $article) {
        echo "<article id='" . $article->getTitle() . "'>";
        //  echo "<article id='$article->getAlias()'>";
        echo $article->getTitle();
        echo "<p>";
        echo $article->getContent();
        echo "</p>";
        echo "</article>";
    }
    echo "</div>";
}
?>
</section>
</body>
</html>