The following warnings occurred:
Warning [2] Undefined array key "threadviews_countguests" - Line: 745 - File: showthread.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/showthread.php 745 errorHandler->error_callback
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/inc/functions_post.php 830 postParser->parse_message
/showthread.php 916 build_postbit
Warning [2] Undefined property: MyLanguage::$thread_modes - Line: 46 - File: showthread.php(1650) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/showthread.php(1650) : eval()'d code 46 errorHandler->error_callback
/showthread.php 1650 eval




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
One-Page-Template-> automatically include new pages in a div
#31
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">    
    <
nav>
        <
ul>
        <?
php get_navigation(return_page_slug()); ?>
    </ul>
    <ul id="subnav"> <!-- output subnav -->
        <li> <a href="#top">Top of Page</a> </li>
        <?php
                
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 ?>
        </ul>
    </nav>
</div> 
Reply


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: 4 Guest(s)