Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2005
    Posts
    51
    Plugin Contributions
    0

    Add to config define pages admin list

    Hi guys

    I am still searching and reading many posts on this one as there seems to be many asking for it.

    Anyway first I am not using EZ-pages as I find the define pages editor more simple and have not found an effective ez-pages tutorial - but that's another topic.

    So back to define pages problem I need help with.

    Adding new pages is a breeze with the aid of the help of the About_Us tutorial/example.

    However I want to be able to turn pages on or off just like the other define pages from the Configuration - Define Pages admin section - but when I add new pages they are not auto listed here - is there something I missed or something else I need to do - please help.

    Cheers

  2. #2
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: Add to config define pages admin list

    The About Us contribution was intentionally designed to not provide switches for turning the page on/off, because the coding to set up all the conditional logic is too tough for most newbies to comprehend.

    If you want to do it, you need to:
    A. add the switches into the database, following the pattern:
    Code:
    insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('Define Conditions of Use', 'DEFINE_CONDITIONS_STATUS', '1', 'Enable the Defined Conditions of Use Link/Text?<br />0= Link ON, Define Text OFF<br />1= Link ON, Define Text ON<br />2= Link OFF, Define Text ON<br />3= Link OFF, Define Text OFF', 25, 75, now(), now(), NULL, 'zen_cfg_select_option(array(\'0\', \'1\', \'2\', \'3\'),');
    B. add the conditions to your sidebox, following the pattern:
    Code:
      if (DEFINE_CONDITIONS_STATUS <= 1) {
        $information[] = '<a href="' . zen_href_link(FILENAME_CONDITIONS) . '">' . BOX_INFORMATION_CONDITIONS . '</a>';
      }
    C. You probably don't need to support the switch settings for "2" and "3", but if you do, then you need to follow the pattern in your template file:
    PHP Code:
    <?php if (DEFINE_CONDITIONS_STATUS >= and DEFINE_CONDITIONS_STATUS <= 2) { ?>
    <div id="conditionsMainContent" class="content">
    <?php
    /**
     * require the html_define for the conditions page
     */
      
    require($define_page);
    ?>
    </div>
    <?php ?>
    .
    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
    Feb 2005
    Posts
    51
    Plugin Contributions
    0

    Default Re: Add to config define pages admin list

    Worked perfect - thank you so much and for a such a quick response

  4. #4
    Join Date
    Feb 2005
    Posts
    51
    Plugin Contributions
    0

    Default Re: Add to config define pages admin list

    Oh and if you want it to be added to the site map

    add code

    Code:
                <?php if (DEFINE_ABOUT_US_STATUS <= 1) { ?>
                <li><?php echo '<a href="' . zen_href_link(FILENAME_ABOUT_US) . '">' . BOX_INFORMATION_ABOUT_US . '</a>'; ?></li>
                <?php } ?>
    to the tpl_site_map_default.php in your template folder :)

  5. #5
    Join Date
    Jun 2009
    Location
    DFW. Texas
    Posts
    1
    Plugin Contributions
    0

    Default Re: Add to config define pages admin list

    DrByte, We want to thank you for your post. This post has been here a while, as the date so clearly states, but it was still very helpful for us. As easy as that was, we will add all of our pages with these steps.
    Thanks again,
    Nick and Keith
    [FONT=Trebuchet MS]I would rather be hated for what I am, than loved for what I am not.[/FONT]
    Our Zen Store: www.thegeeksstore.com

 

 

Similar Threads

  1. v151 How do I add an image to Define Pages?
    By evilsorcerer1 in forum General Questions
    Replies: 1
    Last Post: 12 Jun 2013, 06:40 AM
  2. Incomplete Page List in Define Pages Editor
    By krazykev in forum Basic Configuration
    Replies: 5
    Last Post: 22 Feb 2009, 11:49 AM
  3. Details list config in Admin ?
    By senortim in forum Basic Configuration
    Replies: 5
    Last Post: 24 Apr 2008, 05:07 PM

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