Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
One-Page-Template-> automatically include new pages in a div
Dave, you can use CSS to fix the postion of the nav or sub page nav to the top or side of the page eg. put it in a DIV above the regular page container - but after the php that finds and sorts the array.

CSS something like...
for the container of the sub-nav
#fixednav{position:fixed;top:0;left:0;width:100%;} /* stick to top of the screen and fill the width */

/* for the sub-nav ul */
#subnav{margin:0 auto; width:960px;} /* same as main page container */

the ul subnav will be centred inside the fixed container, stuck to the top of the screen.
you could do something similar with left:0 or right:0 to fix a sidebar;

for example ...this has a normal GS page nav with a sub-page nav underneath in a div fixed to the top of the screen
PHP Code:
<div id="fixednav">    
php get_navigation(return_page_slug()); ?>
    <ul id="subnav"> <!-- output subnav -->
        <li> <a href="#top">Top of Page</a> </li>
foreach ($pagesSorted as $page) if ($page['parent']==$thisPage && $page['private']!='Y') {
$pag $page['url']; ?>
            <li> <a href="#<?php echo $pag?>"><?php getPageField($pag,'menu'); ?></a> </li> 
            <?php ?>

Messages In This Thread
RE: One-Page-Template-> automatically include new pages in a div - by lesh - 2014-11-24, 08:38:02

Users browsing this thread: 1 Guest(s)