Results 1 to 3 of 3
  1. #1
    Join Date
    May 2006
    Posts
    6
    Plugin Contributions
    0

    Default Where are div id's declared

    After upgrading to 1.3.0 my code has many id's that I cannot trace. Things like '<div id="informationContent" .... id="information-content", id="information-footer" etc.

    A search using the 'Developers tool Kit' finds nothing and I've used a search of 'files containing' in the zen-cart-v1.3.0.1-full-fileset folder and nothing. There is even a class="greeting" which doesn't seem to be defined anywhere.

    I think this is affecting my layout and formatting but does anyone know where these items are?

  2. #2
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Where are div id's declared

    Quote Originally Posted by camioman
    After upgrading to 1.3.0 my code has many id's that I cannot trace. Things like '<div id="informationContent" .... id="information-content", id="information-footer" etc.

    A search using the 'Developers tool Kit' finds nothing and I've used a search of 'files containing' in the zen-cart-v1.3.0.1-full-fileset folder and nothing. There is even a class="greeting" which doesn't seem to be defined anywhere.

    I think this is affecting my layout and formatting but does anyone know where these items are?
    Many of the divs whose origin you can't find are created dynamically by the template files in the common directory and sideboxes directory.

    For example, the following code from tpl_box_default_left.php file in the common
    directory is part of a routine called in a loop for each side box that your database says should be displayed using $box_id as a parameter to build up the container and header div IDs.
    PHP Code:
    <!--// bof: <?php echo $box_id?> //-->
    <div class="leftBoxContainer" id="<?php echo str_replace('_''-'$box_id ); ?>" style="width: <?php echo $column_width?>">
    <h3 class="leftBoxHeading" id="<?php echo str_replace('_''-'$box_id) . 'Heading'?>"><?php echo $title?></h3>
    And this code from tpl_information.php (in sideboxes) is similarly used to build up the content div ID (after changing the format in which it is held in the database into that used for the IDs)
    PHP Code:
      $content .= '<div id="' str_replace('_''-'$box_id 'Content') . '" class="sideBoxContent">'
    That answers your question, but I suspect doesn't deal with your problem. So here's a question for you. Why do you think you need to know where these names come from? They're there to give you hooks for CSS styling, so simply knowing that they are there (which you can see from looking at the HTML generated, should be enough for most purposes. You would only need to kow where they come from if you wanted to change them - which I wouldn't recommend!
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

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

    Default Re: Where are div id's declared

    Yes I see Kuroi, my problem was that in the information sidebox the code
    $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">';

    class="sideBoxContent" which I had set to 9pt was not actually being applied to the content which I now see is a <UL><LI> text list, the font was defaulting to something like 14pt.

    So I have had to add <ul class="sideBoxContent"> in the tpl...php and create a ul.sideBoxContent li in the stylesheet.css this now gives me control over the contents.

 

 

Similar Threads

  1. Where is the closing div for #MainWrapper?
    By jami1955 in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 24 Nov 2010, 01:00 AM
  2. where is the div tag for... Home :: All Products
    By hangman21 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 19 Jul 2010, 09:11 AM
  3. Replies: 2
    Last Post: 22 Jul 2008, 09:33 PM
  4. Stuck deep in php - where to add <div>?
    By budfox in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 17 Apr 2007, 07:16 AM

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