Footer navigation display

7 posts by 2 authors in: Forums > CMS Builder
Last Post: June 19, 2009   (RSS)

By drewh01 - June 17, 2009

I need to get only the first or second level of the navigation to appear in the footer while keeping the top nav intact.

Here is the DEV site:
http://207.58.137.58/index.php

As you can see it displayed EVERY page (showall) and for this site, it is way too much for the space.

Here is my top code:

<?php

require_once "/home/adwcom/public_html/cmsAdmin/lib/viewer_functions.php";

list($homepageRecords, $homepageMetaData) = getRecords(array(
'tableName' => 'homepage',
'where' => whereRecordNumberInUrl(1),
'limit' => '1',
));
$homepageRecord = @$homepageRecords[0]; // get first record

list($categoryRecords, $selectedCategory) = getCategories(array(
'tableName' => 'menu',
'selectedCategoryNum' => '1', // defaults to getNumberFromEndOfUrl()
'categoryFormat' => 'showall', // showall, onelevel, twolevel
'useSeoUrls' => false,
));

?>


And the display code:


<?php foreach ($categoryRecords as $record): ?>

{<a href="<?php echo $record['_link'] ?>"><?php echo $record['name'] ?></a> }
<?php endforeach; ?>

Re: [drewh01] Footer navigation display

By ross - June 18, 2009

Hi there.

Thanks for posting!

What you can do is actually just put another viewer down at the bottom for your footer.

So you leave all the code you have there already, but then right above where you want the menu in your footer to appear, put another viewer but select onelevel.

Does that make sense? Basically, you'll have two viewers for your category section.

Let me know what you think :).
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

Re: [ross] Footer navigation display

By drewh01 - June 18, 2009

Thanks - what would that code look like?

Re: [drewh01] Footer navigation display

By ross - June 19, 2009

Hi.

It will look exactly the same as the one you already have but where you had "showall", use "onelevel".

If you attached a copy of your template to a post, I'll be able to show you a bit better, but try copying it first and see where you get to.

Thanks!
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

Re: [drewh01] Footer navigation display

By ross - June 19, 2009

Hi.

Thanks for posting that. What I'll get you to try is at the bottom of the page where you have this:

<?php foreach ($categoryRecords as $record): ?>
{<a href="<?php echo $record['_link'] ?>"><?php echo $record['name'] ?></a> }
<?php endforeach; ?>


Paste this right above it:

<?php
list($categoryRecords, $selectedCategory) = getCategories(array(
'tableName' => 'menu',
'selectedCategoryNum' => '1', // defaults to getNumberFromEndOfUrl()
'categoryFormat' => 'onelevel', // showall, onelevel, twolevel
'useSeoUrls' => false,
));
?>


See how it's the exact same code that you had at the start, but I changed the showall to onelevel.

Give that a shot and let me know how you make out :).
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

Re: [ross] Footer navigation display

By drewh01 - June 19, 2009

Now I get it - you rock!