Announcement

Collapse
No announcement yet.

Can anyone help me understand this code...

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Can anyone help me understand this code...

    Hi, I am working on customizing the category_0.html page and it is taking me a long time because I am not really a programmer. I can get around and do some things and almost have the page perfect to where I want it, but I would love to understand the code a little better, so any help would be greatly appreciated!

    I have learned that the category_0.html controls two areas of the website but are all on the same page of code. The main category landing page (page that list's the main category and all of it's sub categories) (https://doggie-diva.3dcartstores.com...es_c_296.html), and the sub category landing page (page that lists all the sub categories indivually) (https://doggie-diva.3dcartstores.com...ps_c_308.html).

    Here is my question... when you look at the code listed below, how does the code know to call the breadcruming up, both when a user clicks on a main category and also a sub category?

    It seems that the top half of the code up to <!--END: SUB_CATEGORIES-->, controls the main category landing page and any code under the <!--END: SUB_CATEGORIES-->, controls the sub category landing page. But on the top of the code, where it says ' <!--START: BODY_HEADER-->
    <table width="95%" border="0" cellpadding="2" cellspacing="0">
    <tr>
    <td height="17" valign="top" class="breadcrumb"> [CATEGORY_FULLLINE]</td>
    </tr>
    </table>
    <!--END: BODY_HEADER-->, that controls the breadcrumbing and how does that piece of code know to show up on both?

    I just can't seem to move things around the page and customize pages the way I want because I don't understand how 3dcart's html works, if anyone can clarify any of it for me, it would be so helpful. Thanks!

  • #2
    you can use both a category_0 and a category_1 file (copy them into your layout folder). You select WHICH is used in the Products>Category>Options admin screen (the second set of choices, look for category page display type and product page display type)

    It knows what to put there by what you clicked on... so, if you are at your home page... then click BOOKS... the engine uses your category_0 file and replaces the [CATEGORY_FULLLINE] with Home>BOOKS

    Somewhere in your file, you set up your sub-categories and if you click one of those, the engine can use the same template (or not, depending on how many you've created in your layout folder and what those Products>Category>Options are set to) but will replace [CATEGORY_FULLLINE] with Home>BOOKS>Harry Potter (for example)

    To change the layout between the first example and the second example, you use more than one category_x.html file in your layout folder, changing the html structure and using just the tags you need ([CATEGORY_FULLLINE] in both, of course)

    HTH
    Last edited by syncbox; 11-02-2007, 05:08 PM. Reason: more info

    Comment

    Working...
    X