Results 1 to 6 of 6
  1. #1
    Join Date
    Jun 2005
    Posts
    12
    Plugin Contributions
    0

    Default Chapter and TOC table mods

    Greetings,

    I would like to display chapter and TOC in my ezpages but would like the tabel in a horizontal format. I am currently searching the "tpl" files for anything related to ezpages.

    Does anyone know the location and file I need to modify to change the properties of this table ???

  2. #2
    Join Date
    Nov 2006
    Posts
    6
    Plugin Contributions
    0

    css problem Re: Chapter and TOC table mods

    The page is located here:
    /templates/tpl_page_default.php

    I am also working on a horizontal menu. If anyone has a preformatted menu they'd like to share, please do!

    Ideally I was trying to get the 'current' page to move above the others, but this doesn't seem to work when I change the codes. Rather it keeps the position the same.

    Here's an example of what i was trying to do:

    ABOUT
    Services FAQ Contact

    (next page)
    SERVICES
    About FAQ Contact

    What it's doing:

    About

    SERVICES

    FAQ Contact

    My next move is just to put them with the TOC Heading context as a label and bold the current selection.

    If anyone knows the code to make it do what I'd like it to do, please let me know! (oh, I didn't display the context header as I didn't need one)

    Thanks :)

  3. #3
    Join Date
    Nov 2006
    Posts
    6
    Plugin Contributions
    0

    help question Re: Chapter and TOC table mods

    Additionally, if I want to move the TOC code to show up on the TPL_HEADER.PHP file, is this possible?

    I try to remove the code I think is all the code for the TOC, but when I remove it the entire EZ Page does not appear.

    Here's the full TPL_PAGE_DEFAULT code:
    Code:
    <?php
    /**
     * Page Template
     *
     * This is the template used for EZ-Pages content display.  It is named "tpl_page_default" instead of ezpage for friendlier 
     * appearance
     *
     * @package templateSystem
     * @copyright Copyright 2003-2005 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: tpl_page_default.php 2741 2005-12-30 19:58:21Z birdbrain $
     */
    ?>
    <div class="centerColumn" id="ezPageDefault">
    <?php
    
    // horizontal TOC listing
    // create a table of contents for chapter when more than 1 page in the TOC
      if ($pages_listing->RecordCount() > 1 and EZPAGES_SHOW_TABLE_CONTENTS == '1') {?>
    <div id="navEZPagesTOCWrapper">
    <fieldset>
    <legend id="ezPagesTOCHeading"><?php echo TEXT_EZ_PAGES_TABLE_CONTEXT; ?></legend>
    <div id="navEZPagesTOC">
    <ul>
    <?php while (!$pages_listing->EOF) {
    // could be used to change classes on current link and toc (table of contents) links
          if ($pages_listing->fields['pages_id'] == $_GET['id']) { ?>
    
    <li><?php echo CURRENT_PAGE_INDICATOR; ?><a href="<?php echo zen_ez_pages_link($pages_listing->fields['pages_id']);?>"><?php echo $pages_listing->fields['pages_title']; ?></a></li>
    
    <?php } else { ?>
    
    <li><?php echo NOT_CURRENT_PAGE_INDICATOR; ?><a href="<?php echo  zen_ez_pages_link($pages_listing->fields['pages_id']); ?>"><?php echo $pages_listing->fields['pages_title']; ?></a></li>
    <?php
          }
          $pages_listing->MoveNext();
        } ?>
    </ul>
    </div>
    </fieldset>
    </div>
    <!-- EZ page title -->
    <h1 id="ezPagesHeading"><?php echo $var_pageDetails->fields['pages_title']; ?></h1>
    
    <?php
        }
    ?>
    <div><?php echo $var_pageDetails->fields['pages_html_text']; ?></div>
        <?php if (EZPAGES_SHOW_PREV_NEXT_BUTTONS=='2' and $counter > 1) { ?>
    <div id="navEZPageNextPrev">
          <a href="<?php echo $prev_link; ?>"><?php echo $previous_button; ?></a>
          <?php echo zen_back_link() . $home_button; ?></a>
          <a href="<?php echo $next_link; ?>"><?php echo $next_item_button; ?></a>
    </div>
    <?php } elseif (EZPAGES_SHOW_PREV_NEXT_BUTTONS=='1') { ?>
    <div id="navEZPageNextPrev"><?php echo zen_back_link() . $home_button . '</a>'; ?></div>
    <?php  } ?>
    </div>
    And here's the code I removed from the code above, but it seems to mess up this page:
    Code:
    <?php
    
    // horizontal TOC listing
    // create a table of contents for chapter when more than 1 page in the TOC
      if ($pages_listing->RecordCount() > 1 and EZPAGES_SHOW_TABLE_CONTENTS == '1') {?>
    <div id="navEZPagesTOCWrapper">
    <fieldset>
    <legend id="ezPagesTOCHeading"><?php echo TEXT_EZ_PAGES_TABLE_CONTEXT; ?></legend>
    <div id="navEZPagesTOC">
    <ul>
    <?php while (!$pages_listing->EOF) {
    // could be used to change classes on current link and toc (table of contents) links
          if ($pages_listing->fields['pages_id'] == $_GET['id']) { ?>
    
    <li><?php echo CURRENT_PAGE_INDICATOR; ?><a href="<?php echo zen_ez_pages_link($pages_listing->fields['pages_id']);?>"><?php echo $pages_listing->fields['pages_title']; ?></a></li>
    
    <?php } else { ?>
    
    <li><?php echo NOT_CURRENT_PAGE_INDICATOR; ?><a href="<?php echo  zen_ez_pages_link($pages_listing->fields['pages_id']); ?>"><?php echo $pages_listing->fields['pages_title']; ?></a></li>
    <?php
          }
          $pages_listing->MoveNext();
        } ?>
    </ul>
    </div>
    </fieldset>
    </div>
    Any help please! Thanks!

  4. #4
    Join Date
    Nov 2005
    Location
    Colorado Springs, CO USA
    Posts
    7,033
    Plugin Contributions
    31

    Default Re: Chapter and TOC table mods

    You don't need to do anything with the template files; creating the horizontal look can be accomplished in your stylesheet.

    In your stylesheet find the following

    Code:
    .floatingBox, #accountLinksWrapper, #sendSpendWrapper, #checkoutShipto, #checkoutBillto, #navEZPagesTOCWrapper {
    	margin: 0;
    	width: 47%;
    	}
    now create a new declaration and delete the highlighted portion above.
    Code:
    	#navEZPagesTOCWrapper {
    	margin: 0;
    	width: 100%;
    	}
    Now find the following and delete the highlighted portion:
    Code:
    #navEZPagesTOCWrapper {
    	font-weight: bold;
    	float: right;
    	height: 1%;
    	border: 1px solid #9a9a9a;
    	}
    Now find the following and add the highlighted portion:
    Code:
    #navEZPagesTOC ul li {
    	white-space: nowrap;
    		display: inline;
    }
    This should give you your horizontal TOC

  5. #5
    Join Date
    Nov 2006
    Posts
    6
    Plugin Contributions
    0

    Default What is the PHP code for the EZ Pages TOC?

    Hi Clyde,

    Thanks for the CSS. That will help CSS novices, unfortunately it will not help in my case. I was able to create a horizontal menu using CSS, as stated in my first post, but was having an issue with the placement due to the way the PHP was taking the ez page links. I decided to just use fieldset and legends to house the TOC and it looks better BUT I do need help with the following, please!

    I need help with the removal of the EZ Pages TOC PHP because I want to place it ABOVE the main content table (which is in another template file). Why? Because I want to create a javascript where it appears as a submenu and by keeping it in the template file as it currently is, there is other stuff that is displayed above it and it looks off.

    If someone can please help me by providing the actual code that is safe to remove from this template file (so I can paste it into the header file), I'd really appreciate it!

    Thanks again!

  6. #6
    Join Date
    Jun 2008
    Posts
    4
    Plugin Contributions
    0

    Default Re: Chapter and TOC table mods

    This worked great. Thanks @clydejones.

 

 

Similar Threads

  1. Database Table Prefix & Mods
    By philip937 in forum General Questions
    Replies: 4
    Last Post: 12 Jan 2012, 07:48 PM
  2. EZ pages - Chapter TOC levels
    By nicko2 in forum General Questions
    Replies: 2
    Last Post: 8 Jan 2010, 08:34 AM
  3. small ezpages chapter/toc problem...
    By 1kell in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 24 May 2009, 11:25 PM
  4. TOC Sidebox Heading based on Chapter
    By charagg in forum Basic Configuration
    Replies: 1
    Last Post: 10 Apr 2009, 11:17 PM
  5. Add Defined pages to EZ TOC (table of contents)
    By dharma in forum General Questions
    Replies: 1
    Last Post: 1 Feb 2008, 04:50 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR