Announcement

Collapse
No announcement yet.

invalid table markup in default category_0 file

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

  • invalid table markup in default category_0 file

    Hi..

    this markup, taken from the default category_0.html file in the assets/common/ directory is invalid:

    <table border="0" cellspacing="0" cellpadding="5" width="100%" align="center">
    <!--START: CATEGORY_ITEMS-->

    <!--START: ITEM_TEMPLATE_0-->
    <table border="0" cellspacing="0" cellpadding="0" width="95%">


    you cannot put a table inside a table without first putting it into a table row and table cell.

    additionally, you cannot have a table row inside a paragraph:

    <p>
    </td>
    </tr>
    <tr>
    <td colspan="5">&nbsp;</td>


    and I don't even KNOW what <s></s> is!

    <s>[ITEMPRICE]</s><br>[ITEMSALEPRICE]




    This is true for whatever doctype you are using...

    any thought on these issues?
    Last edited by syncbox; 11-05-2007, 06:06 PM. Reason: typo

  • #2
    You are correct, the page as is, is not valid, but once it runs through the engine, it will add rows/cols tags.

    Also about the S tag, see:

    http://www.w3schools.com/tags/tag_strike.asp

    Feel free to replace it if you like, you are not forced to use it if you don't want to.
    ----------------------------
    Gonzalo Gil
    3dCart Support
    800-828-6650 x111

    Comment


    • #3
      Originally posted by syncbox View Post
      [SIZE="2"]Hi..

      <table border="0" cellspacing="0" cellpadding="5" width="100%" align="center">
      <!--START: CATEGORY_ITEMS-->

      <!--START: ITEM_TEMPLATE_0-->
      <table border="0" cellspacing="0" cellpadding="0" width="95%">

      Does the software dynamically write the missing row selector (tr) when it writes in the item blocks?

      does it add a <tr> then add as many <td> blocks as category columns set in the admin, then add an item block table inside each?
      Last edited by syncbox; 11-05-2007, 08:08 PM. Reason: more question to add

      Comment


      • #4
        That's right, since we don't know how many columns and rows you may want on this page, the software inserts them as needed.

        The same template can be used to build 1 column by 20 row, as well as 4 column by 10 row table, this is one of the areas of the software that we had to add HTML to the template, we are thinking about adding 2 new blocks (one for TR, and one for TD), so that then you truly have 100% of the html code being used, but at this time it throws in the html code for you.
        ----------------------------
        Gonzalo Gil
        3dCart Support
        800-828-6650 x111

        Comment


        • #5
          ok, thanks for that. I'll experiment with putting my item templates into things planning for this row/cell approach.

          However, would it not have been just as possible to have a div block (with hasLayout properties) with item template blocks that float?

          For example, if I set up a block that is 150px wide and that floats left, and that is written into

          <div style="width:450px; clear:left;"> (replaces a row)
          <div class="mytemplate0">stuff here, even a table using the width for 3 columns (150px)</div>
          <div class="mytemplate0">stuff here, even a table using the width for 3 columns (150px)</div>
          <div class="mytemplate0">stuff here, even a table using the width for 3 columns (150px)</div>
          </div>

          that would produce a 3 column layout if a row div were added for every product item blocks.

          I'll try to put something like that together (when I have time) and get back to this post to put a link to it. CSS layout isn't that difficult, unless you are still trying to support archaic browsers like netscape4 or ie5x for mac

          There will come a time when deprecated html is eliminated, you know? I've been building css-only layouts for over 5 years. I've nothing against using a table for the actual layout of the item elements (if that makes it easier) but I do try to avoid it, particularly since xml and ajax and other technologies are moving to xhtml standards.

          What would rock would be using row_format blocks (like in category_format) to allow designers to define the grid (my div above) used and column_format for columns (replacing the current td selectors).

          I'd love to be involved if you guys get around to changing things - I am a good beta tester and expert at both markup and css.

          Comment


          • #6
            Right, that would be good, if and only if you are going to have 3 columns on 450px, if you wanted 4 columns, or 5, that would mean editing the template.

            Now each template also has 3 styles of "special" items, and 3 styles of "normal" items, so, i guess, its possible to have tons of category templates with all possible options, of 1 through 5 columns, for all possible styles, but then you would have a huge set of templates, and if you are finding the current setup difficult, a common folder with an additional 30-40 templates isn't going to help :).

            If there is a way to make this happen, perhaps with CSS 3.0 something like: http://www.css3.info/preview/multi-column-layout/

            Then, that will be the way to go for future templates. However, I don't think CSS 3.0 is widely integrated yet, but it seems that the new functionality there will help solve this problem. Until then, tables it is :)
            ----------------------------
            Gonzalo Gil
            3dCart Support
            800-828-6650 x111

            Comment


            • #7
              although the problem itself starts with not making it EASIER to determine which template you are choosing in the first place. It's specious and a bit self-serving to say that the reason is that it would mean too many templates that are hard to choose already... that problem is mostly due to lack of fore-thought... like I said in another thread.. how hard is it to count the category_x files, build the array and modify the count so that 0!=1, 1!=2 and so on...

              in fact, it's not too late to do that if you simply build in some code block that allows you to put a "human" name on a template (like 3-column or 2-column or homepage...) that is used in conjunction with the array of category_x numbers.

              Additionally, anyone who has read any interface design books would know that using a particularly loaded term like "style" (which is major in CSS and and html) to build an array of choices not only once, but TWICE, each thing meaning something different!

              little changes to things like that would make the learning curve of this software easier.

              But like I said, I'll work up my own blocks for my templates sans the funky outer table and we'll see how it goes. I'll keep you posted!

              Comment

              Working...
              X