Announcement

Collapse
No announcement yet.

Using Section Pagination Variables to hide fragments or subsections

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

    Using Section Pagination Variables to hide fragments or subsections

    I am converting a site to use Section Pagination. The site uses fragments at the top of various sections to show introductory info. I would like to only show that fragment on the first page of the paginated product list. Moreover, I am putting the products in multiple columns and would like to have the fragment span the 4 columns.

    It seems the "SectionPaginationCurrentPageIndex" variable could be queried in a BLOCKIF (== 1), but using the variable outside of the Standard Pagination Navigation Links layout, the value always shows "0".
    Cheers, Todd Edwardson
    sigpic
    Edwardson.com & SellerDeck US Sales & Service
    800-503-5717 | 609-773-0800
    todd@edwardson.com

    #2
    One method was to adjust the product list (see here). It would require blockifs to test if the page has a fragment. However, if you create a bare product list, CSS around the fragment for full width, CSS around the product layout for quarter width floated left, this allows a full width fragment spanning 4 product columns with the fragment only on the first page of the pagination.
    Peblaco

    Comment


      #3
      You can do this via a custom Product List Layout.

      Go to Design / Library / Layouts / Product Lists. Right-click Tabular Product List and choose Copy. Rename that copy to Four Column Product List With Heading. Edit that new layout and click the click to edit list layout settings. Select Edit Rows and Columns / First/Middle/Last.

      In "First Row" set:
      No of Items: 1
      Before Row: <tr>
      First Item / Before: <td class="product-details" colspan="4">
      First Item / After: </td>
      After Row: </tr>

      Set Middle Rows / No of Items: 4
      OK out and use this as the Product List Layout for these special Sections.
      Norman - www.drillpine.biz
      Edinburgh, U K / Bitez, Turkey

      Comment


        #4
        Norman that sounds easy enough. Will this work with a fragment for the header text or do you need to use a product with an edited layout?

        Mike
        -----------------------------------------

        First Tackle - Fly Fishing and Game Angling

        -----------------------------------------

        Comment


          #5
          Thanks guys, but the result of each of these methods shows a single product on the first row of ALL the paginated pages, page 2, page 3, etc. That's why I'd like to use the SectionPaginationCurrentPageIndex outside of the Standard Pagination Navigation Links layout. I have even tried setting up a "dummy" subsection to act as a "fragment", but the SectionPaginationCurrentPageIndex doesn't work there either. I'm starting to think Javascript in the Standard Pagination Navigation Links layout to set "display:none" on a fragment id.
          Cheers, Todd Edwardson
          sigpic
          Edwardson.com & SellerDeck US Sales & Service
          800-503-5717 | 609-773-0800
          todd@edwardson.com

          Comment


            #6
            The method I outlined with bare product list and CSS does not show the same single row product / fragment on all the paginated pages.
            Peblaco

            Comment


              #7
              Thanks Louise, right you are. I had to get the css right, but all is working great, thanks. http://test.audiobasics.com
              Cheers, Todd Edwardson
              sigpic
              Edwardson.com & SellerDeck US Sales & Service
              800-503-5717 | 609-773-0800
              todd@edwardson.com

              Comment


                #8
                You may want to browser test the pages though, section fragment spilling out of the layout (Firefox).
                Peblaco

                Comment


                  #9
                  Thanks yes, proofing it all now.
                  Cheers, Todd Edwardson
                  sigpic
                  Edwardson.com & SellerDeck US Sales & Service
                  800-503-5717 | 609-773-0800
                  todd@edwardson.com

                  Comment


                    #10
                    There's a couple of problems with the menu too.

                    1. The bottom category has some weird shading.

                    2. In Chrome:

                    - Go 'Audio Electronics' > 'Art Vinyl' (for example)
                    - Then Click 'Audio Furniture'

                    It looks like this:



                    Mike
                    -----------------------------------------

                    First Tackle - Fly Fishing and Game Angling

                    -----------------------------------------

                    Comment


                      #11
                      That's because it's a top level section with shadow CSS styling which looks slightly expanded because of the wording wrapping on two lines. It's not one of the inner sections. It can be hard to tell them apart through so perhaps a different CSS theme for the menu or some custom styling would help make them look more consistent.
                      Peblaco

                      Comment


                        #12
                        Thank guys, I really appreciate the help and the extra pair(s) of eyes.
                        Cheers, Todd Edwardson
                        sigpic
                        Edwardson.com & SellerDeck US Sales & Service
                        800-503-5717 | 609-773-0800
                        todd@edwardson.com

                        Comment

                        Working...
                        X