Announcement

Collapse
No announcement yet.

is it possible to specify the layout for child (sub)sections?

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

    is it possible to specify the layout for child (sub)sections?

    Scenario

    All parent sections use the same layout
    All child (sub)sections (between maybe 5 and 20 per section) have the same layout as each other but different from the parent layout.

    At present, in "site options" the section layout is set as the one the parent sections use (there are quite a number of these too)
    When I add subsections, I have to change the layout in EVERY child section to the correct subsection layout

    Is it possible to specify "Child section layout" at section level?
    It'd be handy if it is but I can't see where
    Tracey

    #2
    I don't think this can be set globally.

    I do something similar for splab and use the sectionlink field in the hierarchical import to specify the section link layout.

    You could possibly try playing with the StandardLayout and use parent settings fields.

    Sorry for the vagueness but I don't have my hierarchicals at hand. I remember the help file told me exactly how to use the fields once I had figured out which ones to use.
    "Opportunities multiply as they are seized." - Sun Tzu

    Comment


      #3
      I think you could do this with conditions.

      First of all you need to create two section lists - one which is designed for your parent sections, and one which is designed for your sub sections. You then need to insert them both into your inner layout - to do this you can insert the standard 'SubSectionListTop' layout selector and then tick 'Use Fixed Layout' to hard-wire which section list gets inserted into the page.

      Then put a condition around the parent section list that says something like:

      SectionLevel == 0

      and one around the child section list that says

      SectionLevel > 0

      Comment


        #4
        thanks Chris (and Jon)

        Chris, would that then affect ALL child sections on the site though?
        There are some sections with child sections that won't be using this different layout (which is the section link layout leading to single product pages) and I'm wondering if your solution is completely global rather than section specific.

        Perhaps it could be a suggestion for the wishlist. The ability to specify child section layouts at parent level?
        Tracey

        Comment


          #5
          Perhaps it could be a suggestion for the wishlist. The ability to specify child section layouts at parent level?
          But surely that's also completely global, rather than section-specific?

          I'm clearly not understanding what you are getting at - could you give an example. I probably is possible.

          Comment


            #6
            Basically, in the layout tab of a section (ie, place of setting) I want to be able to say

            a) use "this" layout for this section (ie...the way this one is displayed)

            b) use "this" (different) layout for this section's subsections

            At present, there is no method of doing b. You have to set the layout for every individual child (sub)section separately.

            But I don't want EVERY subsection in the store to use the same layout..some will be sections, leading to sections, leading to multiple product pages.
            Some will be sections, leading to section links pages leading to single product pages.
            So a global option is no good. I want to be able to specify it at section level.

            Hmmm..hope that was clearer

            Thanks for your help, it's much appreciated
            Tracey

            Comment


              #7
              What Tracey is getting at Chris (i think) is that when we set a layout in site options, unless all sections below that have use parent, they do not read from that setting. The 'use parent' simply looks up one level from where it is. I think actinic would benefit greatly from having a 'use parent' option and also a 'use site master setting' (ie the one in site options) setting. Differentiate between the two in other words.

              At the moment if you want subs to have different layouts, you have to set them all individually, unless they will all be the same, at which stage you set it at the parent level.

              Section Link Layouts can get a bit of a mess here also, as you define column counts at one level, but the layout type at another.

              Comment


                #8
                Originally posted by leehack
                Section Link Layouts can get a bit of a mess here also, as you define column counts at one level, but the layout type at another.
                yeh, this proves my point really.

                You specify the column count for the subsections at parent level, but the layouts for them at the next level down.
                It's just tedious, tbh, when I could be specifying the subsection layout at the same place as I'm specifying their column count
                Tracey

                Comment


                  #9
                  OK - understood now. I was being a bit thick.

                  The only way you could automate this was to always have certain types of section link at certain levels in your store. So for example you always have three levels of the store
                  - Top Level Sections - which have a condition so the section links always look a certain way
                  - Sub-Sections - which have a different condition so the section links look a certain way - and different from the top level sections
                  - Sub-Sub-Sections - which again have a different condition in.

                  That way, the position of the section in the tree would determine how the section link appears by default. You would need to enforce the section hierarchy quite strictly through, and you couldn't really vary from it.

                  Comment


                    #10
                    I get you, Chris.
                    Unfortunately, that doesn't work for the site in question but it's something to think about.

                    Might head to the wishlist and post something about it when I get a sec

                    Thanks for your help
                    Tracey

                    Comment


                      #11
                      Finally got my hands on my hierarchicals. The following method is convenient for me because I manage all my products in heirarchical style excel sheets.

                      Originally posted by budgetbumps
                      a) use "this" layout for this section (ie...the way this one is displayed)

                      b) use "this" (different) layout for this section's subsections
                      a & b can be achieved by specifying the layout the section should use in the SectionLink field of the hierarchical import. You could have this section with layout a, the next section with layout b, this sub section with layout c and all other sub sections with layout d. All you would need to do is specify the layout that the section should use by giving the layouts name e.g. CSS Section Link Layout

                      The attached image shows you what I mean.

                      Explanation.
                      I have created two custom section layouts. One for single film products and one for boxes of film.
                      I then specify which layout the section should use based on the product.

                      Bumps, if the SectionLink field in the export isn't the ticket then maybe try the other fields mentioned earlier.

                      I agree with you whole heartedly though. It would be nice to have this automated.
                      Attached Files
                      "Opportunities multiply as they are seized." - Sun Tzu

                      Comment


                        #12
                        Unfortunately, that doesn't work for the site in question but it's something to think about.

                        Might head to the wishlist and post something about it when I get a sec
                        I'll certainly pass it onto the developers on your behalf.

                        As a general principle, if you do have the opportunity to be quite rigid in store hierarchy when designing a new store, it means you can do all sorts of clever tricks with the design using conditions to automatically change the appearance of the links/pages based on where they are in the store hierarchy. It can save lots of time.

                        Comment


                          #13
                          thanks, Chris

                          Believe me, if I could have done it with a blockif, I'd have done it already. My layouts (well, on my stores anyway) are littered with little green text

                          I did take a look at the store layout to see if it would work by concentrating the section links all at the same level and the other sections not..but it won't work in this case.

                          Certainly is something I'm going to remember though, thanks again
                          Tracey

                          Comment


                            #14
                            Originally posted by cdicken
                            OK - understood now. I was being a bit thick.

                            The only way you could automate this was to always have certain types of section link at certain levels in your store. So for example you always have three levels of the store
                            - Top Level Sections - which have a condition so the section links always look a certain way
                            - Sub-Sections - which have a different condition so the section links look a certain way - and different from the top level sections
                            - Sub-Sub-Sections - which again have a different condition in.

                            That way, the position of the section in the tree would determine how the section link appears by default. You would need to enforce the section hierarchy quite strictly through, and you couldn't really vary from it.
                            Hi Chris,
                            Is there instructions on how to set up this 3 levels of sections anywhere? Or is there a post on it, I can't seem to find it.
                            Regards,
                            Breda

                            Comment


                              #15
                              Hi Breda

                              The conditions to use are with the 'SectionLevel' variable e.g.

                              Within a section link layout you could use the following within conditions:

                              SectionLevel == 1 (only used for links to top level sections)
                              SectionLevel == 2 (only used when the link is to a sub-section)

                              If you want to control what appears based on the section that the section link is appearing within then use MainSection::SectionLevel

                              e.g.

                              MainSection::SectionLevel == 0 (this will only affect section links that are shown on the home page)

                              Hope that gets you started.

                              Comment

                              Working...
                              X