
meg
User
Jan 13, 2012, 1:29 PM
Post #3 of 8
(683 views)
Shortcut
|
|
Re: [Damon] Blog Navigation Question and Question on Warning Error
[In reply to]
|
Can't Post
|
|
Thanks for your input. I tried that with no luck, but maybe I'm inserting it wrong. Here's what I have as my php header:
<? include_once("include/session_inc.php");?> <?php header('Content-type: text/html; charset=utf-8'); ?> <?php $libraryPath = 'cms/lib/viewer_functions.php'; $dirsToCheck = array('/','','../','../../','../../../'); foreach ($dirsToCheck as $dir) { if (@include_once("$dir$libraryPath")) { break; }} if (!function_exists('getRecords')) { die("Couldn't load viewer library, check filepath in sourcecode."); } list($headerRecords, $headerMetaData) = getRecords(array( 'tableName' => 'header', 'where' => whereRecordNumberInUrl(1), 'limit' => '1', 'allowSearch' => false, )); $headerRecord = @$headerRecords[0]; list($portfolio_menuRecords, $portfolio_menuMetaData) = getRecords(array( 'tableName' => 'portfolio_menu', 'allowSearch' => false, )); list($footerRecords, $footerMetaData) = getRecords(array( 'tableName' => 'footer', 'where' => whereRecordNumberInUrl(1), 'limit' => '1', 'allowSearch' => false, )); $footerRecord = @$footerRecords[0]; list($promoRecords, $promoMetaData) = getRecords(array( 'tableName' => 'promo', 'where' => whereRecordNumberInUrl(1), 'limit' => '1', 'allowSearch' => false, )); $promoRecord = @$promoRecords[0]; list($blog_entriesRecords, $blog_entriesMetaData) = getRecords(array( 'tableName' => 'blog_entries', 'allowSearch' => false, )); list($blog_entriesRecords, $blog_entriesMetaData) = getRecords(array( 'tableName' => 'blog_entries', 'where' => whereRecordNumberInUrl(1), 'limit' => '1', 'allowSearch' => false, )); $blog_entriesRecord = @$blog_entriesRecords[0]; ?> A sample include looks like this:
<? include_once("include/footer-2011.php");?> The sidebar menu looks like this:
<?php foreach ($blog_entriesRecords as $record): ?><li><a href="<?php echo $record['_link'] ?>" title="<?php echo $record['title'] ?>"><?php echo $record['title'] ?></a></li><?php endforeach ?> Let me know what I should modify. Thank you!!
(This post was edited by meg on Jan 17, 2012, 10:33 AM)
|