Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2006
    Location
    Boise, ID
    Posts
    334
    Plugin Contributions
    0

    Default Adding a simple table

    Hello All,

    Trying to add a simple tabel for petes sake, in the tpl_main_page.php
    I found the right spot, just UNDER the header and just before the rest of the page
    to add the code so it diplays as needed but I can not seem to use simple HTML
    <table width=100% border=2 bordercolor=red>
    <tr>
    <td>test</td>
    </tr>
    </table>

    test does show, but the border does not, nor the color so I know where the dame table is
    while I develop the page.

    Adding to the main page as follows :


    <!-- ========== HEADER ========== -->
    <?php
    /* prepares and displays header output */

    if (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_HEADER_OFF == 'true' and ($_SESSION['customers_authorization'] != 0 or $_SESSION['customer_id'] == '')) {

    $flag_disable_header = true;

    }
    require($template->get_template_dir('tpl_header.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_header.php');
    ?>

    <!-- ============================ -->

    <table width=100% border=2 bordercolor=red>
    <tr>
    <td>test</td>
    </tr>
    </table>

    <table border="1" cellspacing="0" cellpadding="0" id="contentMainWrapper">
    <tr>

    <?php
    if (COLUMN_LEFT_STATUS == 0 or (CUSTOMERS_APPROVAL == '1' and $_SESSION['customer_id'] == '')) {

    // global disable of column_left

    $flag_disable_left = true;
    }

    if (!isset($flag_disable_left) || !$flag_disable_left) {

    ?>

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: Adding a simple table

    Try from the admin, editing the define page "main_page.php"
    Add your html to that file & save
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,263
    Plugin Contributions
    3

    Default Re: Adding a simple table

    What is the reason for hard-coding this into a PHP file?

    This will make the element "SITE WIDE".

    What are you hoping to do with this "table"? Do you want it to appear on ALL pages, or just the home page?

    Further, inline styles are largely DEPRECATED, and your site will probably fail VALIDATION tests. You should rather encase elements in DIVS, and then apply styles in a stylesheet.

    But... best NOT to hard-code into PHP files. KOBRA tells you where to put in a table if you just want something on the home page.
    20 years a Zencart User

  4. #4
    Join Date
    Feb 2006
    Location
    Boise, ID
    Posts
    334
    Plugin Contributions
    0

    Default Re: Adding a simple table

    Sorry, can we close this thread ?
    I posted the same http://www.zen-cart.com/showthread.p...-on-front-page

 

 

Similar Threads

  1. Adding simple corner banner
    By pb4 in forum General Questions
    Replies: 5
    Last Post: 10 Oct 2012, 05:15 PM
  2. v139h Need simple 'Table' code
    By mlapage in forum General Questions
    Replies: 3
    Last Post: 7 Jul 2012, 05:27 PM
  3. Help: Creating Simple Form to Post to New DB Table
    By shakes222 in forum General Questions
    Replies: 2
    Last Post: 14 Dec 2010, 11:04 PM
  4. Adding new simple module
    By xxxxmexxxx in forum Addon Payment Modules
    Replies: 9
    Last Post: 3 Oct 2010, 01:00 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