foreach ($pageArray as $page) { echo "<li>"; echo "<a href='testFinal.php?page=" . $page->getId() . "'> " . $page->getWebName() . "</a>"; echo "</li>"; } ?> </ul> </nav> <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>";
<?php //TODO: add conditional for header (add/edit) ?> <h3>Edit Article:</h3> <form action="editorPortal.php" method="post"> <?php require "../Business/ArticleClass.php"; require "../Business/PageClass.php"; require "../Business/ContentAreaClass.php"; $currentArticle = ArticleClass::getSingleArticle($_POST['editArticleId']); $arrayOfPages = PageClass::retrievePages(); $arrayOfDivs = ContentAreaClass::retrieveDivs(); //TODO: add code to preset pageOn and divIn selected option values (add vs edit?) ?> <table> <tr> <td>Article Title: </td> <td><input type="text" id="aTitle" name="aTitle" value="<?php echo $currentArticle->getTitle(); ?> " /></td> </tr> <tr> <td>Webname: </td> <td><input type="text" id="aWebName" name="aWebName" value="<?php echo $currentArticle->getWebName();