Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2008
    Location
    Cleethorpes
    Posts
    1,227
    Plugin Contributions
    6

    red flag Define Pages in footer

    which piece of code do I need to put in tpl_footer.php to display all define_pages in a links list please?
    Nick Smith - Venture Design and Print
    https://venturedesignandprint.co.uk

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Define Pages in footer

    No idea why nor what you have in mind by mentioning "define pages" .... because most of those are for content that displays as blocks of info inside other pages.

    But you can build a list of links using basic HTML, interpolating page names as needed, like this:
    Code:
    <a href="<?php echo zen_href_link(FILENAME_CONDITIONS); ?>"><?php echo BOX_INFORMATION_CONDITIONS; ?></a>
    Repeat as many times as necessary for each page needed. You could look at tpl_site_map_default.php for more examples of common internal pages.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Sep 2008
    Location
    Cleethorpes
    Posts
    1,227
    Plugin Contributions
    6

    red flag Re: Define Pages in footer

    Quote Originally Posted by DrByte View Post
    No idea why nor what you have in mind by mentioning "define pages" .... because most of those are for content that displays as blocks of info inside other pages.

    But you can build a list of links using basic HTML, interpolating page names as needed, like this:
    Code:
    <a href="<?php echo zen_href_link(FILENAME_CONDITIONS); ?>"><?php echo BOX_INFORMATION_CONDITIONS; ?></a>
    Repeat as many times as necessary for each page needed. You could look at tpl_site_map_default.php for more examples of common internal pages.
    They are for informational purposes in the footer.Name:  Screenshot 2021-01-14 at 07.18.05.jpg
Views: 278
Size:  35.0 KB

    I managed to get them out by using this piece of PHP from modules/sidebars/information.php

    Useful for people navigating the site from the footer, as well as the sidebar.

    PHP Code:
    <?php/** * information sidebox - displays list of general info links, as defined in this file * * BOOTSTRAP v3.0.0 * * @copyright Copyright 2003-2020 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: DrByte 2020 May 16 Modified in v1.5.7 $ */
      unset($information);  $information = array();
      if (DEFINE_SHIPPINGINFO_STATUS <= 1) {    $information[] = '<a class="list-group-item list-group-item-action" href="' . zen_href_link(FILENAME_SHIPPING) . '">' . BOX_INFORMATION_SHIPPING . '</a>';  }  if (DEFINE_PRIVACY_STATUS <= 1) {    $information[] = '<a class="list-group-item list-group-item-action" href="' . zen_href_link(FILENAME_PRIVACY) . '">' . BOX_INFORMATION_PRIVACY . '</a>';  }  if (DEFINE_CONDITIONS_STATUS <= 1) {    $information[] = '<a class="list-group-item list-group-item-action" href="' . zen_href_link(FILENAME_CONDITIONS) . '">' . BOX_INFORMATION_CONDITIONS . '</a>';  }  if (DEFINE_CONTACT_US_STATUS <= 1) {    $information[] = '<a class="list-group-item list-group-item-action" href="' . zen_href_link(FILENAME_CONTACT_US, '', 'SSL') . '">' . BOX_INFORMATION_CONTACT . '</a>';  }
    // forum/bb link:  if (!empty($external_bb_url) && !empty($external_bb_text)) {    $information[] = '<a class="list-group-item list-group-item-action" href="' . $external_bb_url . '" rel="noopener" target="_blank">' . $external_bb_text . '</a>';  }
      if (DEFINE_SITE_MAP_STATUS <= 1) {    $information[] = '<a class="list-group-item list-group-item-action" href="' . zen_href_link(FILENAME_SITE_MAP) . '">' . BOX_INFORMATION_SITE_MAP . '</a>';  }
      // only show GV FAQ when installed  if (defined('MODULE_ORDER_TOTAL_GV_STATUS') && MODULE_ORDER_TOTAL_GV_STATUS == 'true') {    $information[] = '<a class="list-group-item list-group-item-action" href="' . zen_href_link(FILENAME_GV_FAQ) . '">' . BOX_INFORMATION_GV . '</a>';  }  // only show Discount Coupon FAQ when installed  if (DEFINE_DISCOUNT_COUPON_STATUS <= 1 && defined('MODULE_ORDER_TOTAL_COUPON_STATUS') && MODULE_ORDER_TOTAL_COUPON_STATUS == 'true') {          $information[] = '<a class="list-group-item list-group-item-action" href="' . zen_href_link(FILENAME_DISCOUNT_COUPON) . '">' . BOX_INFORMATION_DISCOUNT_COUPONS . '</a>';  }
      if (SHOW_NEWSLETTER_UNSUBSCRIBE_LINK == 'true') {    $information[] = '<a class="list-group-item list-group-item-action" href="' . zen_href_link(FILENAME_UNSUBSCRIBE) . '">' . BOX_INFORMATION_UNSUBSCRIBE . '</a>';  }
      require($template->get_template_dir('tpl_information.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_information.php'); 
      $title =  BOX_HEADING_INFORMATION;  $title_link = false;
      require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default); ?>
    Nick Smith - Venture Design and Print
    https://venturedesignandprint.co.uk

  4. #4
    Join Date
    Oct 2008
    Location
    Croatia
    Posts
    1,542
    Plugin Contributions
    19

    Default Re: Define Pages in footer

    That's exactly how you're supposed to add those pages...

    There is a "workaround" if you want to have those links controlled from the admin... I'm assuming your next column, Useful Links, is constructed with footer EZ-Pages. What you could do is clone the ezpages_bar_footer module and modify the query. So, now that you have includes/modules/ezpages_bar_footer.php and includes/modules/ezpages_bar_footer_2.php (and matching tpl files), you could edit both files and add one line to the query:
    Code:
    $pages_query = $db->Execute("SELECT e.pages_id, e.page_open_new_window, e.page_is_ssl, e.alt_url, e.alt_url_external, e.toc_chapter, ec.pages_title
                                  FROM  " . TABLE_EZPAGES . " e,
                                        " . TABLE_EZPAGES_CONTENT . " ec
                                  WHERE e.pages_id = ec.pages_id 
                                  AND ec.languages_id = " . (int)$_SESSION['languages_id'] . "
                                  AND e.status_footer = 1
                                  AND e.footer_sort_order > 0
                                  AND e.footer_sort_order < 100
                                  ORDER BY e.footer_sort_order, ec.pages_title");
    The other file would have >=100, of course. That way, the first column would show EZ Pages with footer sort order less than 100, and the other would be for 100 or higher.

    BTW, I gotta say (as a non-Apple user) - that dock bar looks scary...

 

 

Similar Threads

  1. v156 How to define anchors (fragment identifiers) in define pages?
    By gernot in forum Customization from the Admin
    Replies: 11
    Last Post: 21 Jun 2019, 08:15 AM
  2. Define Define Pages / Information pages Manager needed
    By thunderesl in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 2 Jun 2010, 02:42 PM
  3. Define Pages - How to define brand new page
    By hutch32804 in forum Customization from the Admin
    Replies: 4
    Last Post: 31 Oct 2009, 01:39 PM
  4. index_default & define pages(4+ define pages on frontpage?)
    By mrmarcus66 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 13 May 2006, 07:38 PM

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