Announcement

Collapse
No announcement yet.

Multi sized fragments on one page problem (almost working)

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

    Multi sized fragments on one page problem (almost working)

    I have a test page with fragments in a grid format:

    http://www.patchwork-rabbit.co.uk/ac...mn_test_3.html


    I'd like to have a full width fragment on the same page. I found this:

    http://community.actinic.com/showthread.php?t=29983

    and so created a new fragment ("colspan4"), which is the same as my stock fragment but with the table code wrapped in <tr> <td colspan="4"> tags, which is what I think JonT was driving at in his post in the above thread.

    However, when I add a colspan4 fragment, it will only print 3 grid fragments to a line:


    http://www.patchwork-rabbit.co.uk/ac...mn_test_2.html


    and when I add another colspan4 fragment, it will only print 2 grid fragments to a line:

    http://www.patchwork-rabbit.co.uk/ac...tumn_test.html


    so it's clearly something up with my tags but the source code doesn't seem to have any tags out of place, it just throws a new line in the middle of the page

    What on earth am I doing wrong??
    The Patchwork Rabbit

    #2
    Interestingly, when the colspan4 fragment is at the end, it works fine.

    http://www.patchwork-rabbit.co.uk/ac...-patterns.html

    So, I suspect this is something to do with the width of the colspan4 fragment?
    The Patchwork Rabbit

    Comment


      #3
      The fragment list layout needs to have the top row set to colspan by the fragment column count. Dont hard code the number 4 in, use the variable instead. That way whatever you add in, will be colspanned by the top row, in effect providing a full width first fragment and then the next row will adhere to the column count.

      Gotta get close and comfy with list layouts, they're the key, understand that and it is so easy to grasp, no need for complications like in the linked thread.

      Comment


        #4
        From what I can see, fragment column count only appears on Brochure pages. When fiddling with fragments on product pages, you just treat them like products and use "product column count" which is what I'm using. I think you agree on this thread??:

        http://community.actinic.com/showthread.php?t=46483

        http://community.actinic.com/showthr...t=37090&page=2

        I completely agree about hard-coding, I just wanted to see if it would work first and was eliminating any potential issues. While debugging, hardcoding is OK. Unless I'm really missing the point, I don't see how that would cause this problem?

        It's more like the colspan4 (not it's actual name, just used for the purposes of clarity) fragment width is causing the problem, despite being 100%.
        The Patchwork Rabbit

        Comment


          #5
          I'd imagine that you do not have top middle and bottom rows set correctly, needs to open with the count, then open up the <tr> and then the tds within and then close with the </tr>. That needs to compute and be consistent on the top middle and bottom rows so that the whole thing can be produced within one table.

          Comment


            #6
            Oh pants, so I can't easily have multiple full width and "grid" type fragments?

            That sounds like the product layout needs to know which one will be full width and which will be multi
            The Patchwork Rabbit

            Comment


              #7
              If you mockup what you're trying to do, i can advise best way to do it. You're probably going to have to split into multiple list layouts with set product counts for each or alike, but i can let you know if you show me something i can understand (think sketch on fag packet type thing).

              Comment


                #8
                Ah, thanks Lee.

                Ideally, I want to be able to have one or more full width fragments (or colspan4s) followed by my grid of fragments.

                Like:

                http://www.patchwork-rabbit.co.uk/ac...tumn_test.html

                or

                http://www.patchwork-rabbit.co.uk/ac...mn_test_2.html



                This is almost working. I just can't see why it's throwing a line like that. The tags and things all seem to be in the right place...
                The Patchwork Rabbit

                Comment


                  #9
                  Don't think on it too long, I can live with just one full width fragment and do it the same way as my thread pages that have a full width nav bar on the top. But multiple ones would be good.


                  I initially tried having a new product layout that had fragment lists, one for full width ones and one with a grid, but that wouldn't display anything at all! LOL
                  The Patchwork Rabbit

                  Comment


                    #10
                    Whats set as the bottom row on the list layout, if that is set to be used then the last item on page will jump into it?

                    Comment


                      #11
                      I'm being a tard and assuming you mean the Product List Layout? First and last rows are both set to "not used".
                      The Patchwork Rabbit

                      Comment


                        #12
                        You have the fragment anchor seemingly on its own row, then you colspan 4 columns, then you repeat one row for the anchor and then go 2 wide for the fragments. You have more tables in play than the local diner, what's with all the nested tables? you're supposed to be learning CSS missie! I'm gonna guess and say that the coding on your fragment layout is wrong, select standard untouched actinic fragment layouts for your fragments to see whether that be true or not, something is awfully amiss, it's surprising it looks that good!

                        Comment


                          #13


                          The fragment is exactly as the standard one, but I've wrapped the table code (but not the anchor. Tried it both ways and it didn't seem to make any difference, but forgot to change it back) in tags <tr><td colspan="4">. The <tr> is because the product layout starts the cell with a <td>.

                          The nested tables are from the fragment.



                          You say, "go 2 wide for the fragments", but that's exactly my problem. I'm not doing that and can't figure out why it is.
                          The Patchwork Rabbit

                          Comment


                            #14
                            OK, so I created a new product list layout, stripped out all the cell <td> tags and moved them to the two fragments from which I stripped all the table stuff. So now, the generated HTML looks like:

                            Code:
                            <table border="0" cellpadding="0" cellspacing="0" width="800">
                               <tr>
                                  <td colspan="4" align="left" valign="top">
                                     <a name="a1217"></a>
                                     <span class='fragTitleMD'>These are not the droids you are looking for.</span>
                                     <br />
                                     <br />
                                  </td>
                               </tr>
                               <tr>
                                  <td colspan="4" align="left" valign="top">
                                     <a name="a1216"></a>
                                     <span class='fragTitleMD'>Fat pumpkins, crunchy leaves and harvest blessings</span> 
                                     <br /> 
                                     <br />
                                     <br />
                                  </td>
                               </tr>
                               <tr>
                                  <td valign="top" align="center" >   
                                     <a name="a1215"></a>
                                     <span class='fragTitleSM'>Product 4</span>
                                     <br/>
                                     <br/>
                                     <img src="bent-creek-snappy-sampler-sm.jpg" id="fim-444_3" alt="Product 4" border="0" width="150" height="150" />
                                     <br/>
                                  </td>
                                  <td valign="top" align="center" >  
                                     <a name="a1214"></a>
                                     <span class='fragTitleSM'>Product 3</span>
                                     <br/>
                                     <br/>
                                     <img src="bent-creek-snappy-sampler-sm.jpg" id="fim-444_4" alt="Product 3" border="0" width="150" height="150" />
                                     <br/>
                                  </td>
                               </tr>
                               <tr>
                                  <td class="solid_line_blue" colspan="4">
                                     <img src="theme_shim.gif" height="1" width="1" alt=" " />
                                  </td>
                               </tr>
                               <tr>
                                  <td valign="top" align="center" >
                                     <a name="a1213"></a>
                                     <span class='fragTitleSM'>Product 2</span>
                                     <br/>
                                     <br/>
                                     <img src="bent-creek-happy-thanksgiving-sm.jpg" id="fim-444_5" alt="Product 2" border="0" width="150" height="150" />
                                     <br/>
                                  </td>
                                  <td valign="top" align="center" >
                                     <a name="a1212"></a>
                                     <span class='fragTitleSM'>Product 1</span>
                                     <br/>
                                     <br/>
                                     <img src="bent-creek-happy-christmas-sm.jpg" id="fim-444_6" alt="Product 1" border="0" width="150" height="150" />
                                     <br/>
                                  </td>
                               </tr>
                               <tr>
                                  <td class="solid_line_blue" colspan="4"><img src="theme_shim.gif" height="1" width="1" alt=" " />
                                  </td>
                               </tr>
                            </table>
                            But the colspan4 fragment is still forcing early <tr> tags for some reason.

                            This one has no colspan4 fragments so all four products appear on one line:
                            http://www.patchwork-rabbit.co.uk/ac...mn_test_3.html


                            This one has one colspan4 fragments, so now only 3 products per line.
                            http://www.patchwork-rabbit.co.uk/ac...mn_test_2.html

                            This one has two colspan4 fragments, and thus, only 2 products per line.
                            http://www.patchwork-rabbit.co.uk/ac...tumn_test.html



                            The ONLY difference about the above pages is the number of colspan4 fragments appearing above the fragment grid. This has to be something to do with the number of fragments and the column count.

                            So, it's treating the colspan4 fragment like the first in the list of 4 to show in the grid, showing it full width then putting the next 3 in the grid maybe? I wonder what would happen if I had 4 colspan4 fragments...




                            The Patchwork Rabbit

                            Comment


                              #15
                              Yes, that's the problem.

                              a la: http://www.patchwork-rabbit.co.uk/ac...mn_test_4.html


                              when I put in 2 more colspan4 fragments, the grid goes back to being 4 wide. I've also modified Autumn_test.html to have more products. This clearly shows that the first two colspan4 fragments are being included in the column count because the second line has 4 products on it.


                              Blank fragments is not an ideal solution, but it's a reasonable work around for now.

                              Thanks for taking the time to look at this, Lee
                              The Patchwork Rabbit

                              Comment

                              Working...
                              X