Announcement

Collapse
No announcement yet.

Custom Section List With Sub Sections

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

    #16
    Roger,

    Did you try post #1 as that's what it's meant to do.
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #17
      additional...

      further to previous post...

      I think your code may only be breaking when it is the last parent section in the list that contains subsections, i.e. there is no SectionNameNext, so it closes the list </li></ul> before handling the subsections.
      Roger Coathup
      Principal Consultant, 21 Thoughts Limited: futures inspired business consultancy
      Director, 21 Inspired Limited: website design and online services

      Comment


        #18
        Hi Norman,

        No, I'd just used Chris's version....

        thanks... I just took the additional AND clause from post #1 and merged it into Chris's code... it's getting me closer.

        I'll try post #1 directly, although the code seems to include a block_if at the end that doesn't contain anything.

        Roger
        Roger Coathup
        Principal Consultant, 21 Thoughts Limited: futures inspired business consultancy
        Director, 21 Inspired Limited: website design and online services

        Comment


          #19
          Hi Norman,

          I cut and paste the code from post #1, and it doesn't work at all for me... I get <ul><li>.... </ul></li> pairings all through my list.

          Roger
          Roger Coathup
          Principal Consultant, 21 Thoughts Limited: futures inspired business consultancy
          Director, 21 Inspired Limited: website design and online services

          Comment


            #20
            ok, after some hacking, this works for me (for a list with just one level of subsections), and without exhaustive testing:

            <actinic:block type="EntireSectionList" >

            <actinic:block if="%3cactinic%3avariable%20name%3d%22SectionNamePrev%22%20%2f%3e%20%21%3d%20%22%22" ></li></actinic:block>

            <actinic:block if="%28%3cactinic%3avariable%20name%3d%22SectionNamePrev%22%20%2f%3e%20%3d%3d%20%22%22%29%20AND%20%28%3cactinic%3avariable%20name%3d%22SectionLevel%22%20%2f%3e%20%3d%3d%202%29" ><ul><li></actinic:block>
            <actinic:block if="%28%3cactinic%3avariable%20name%3d%22SectionNamePrev%22%20%2f%3e%20%3d%3d%20%22%22%29%20AND%20%28%3cactinic%3avariable%20name%3d%22SectionLevel%22%20%2f%3e%20%3d%3d%201%29" ><li></actinic:block>

            <actinic:block if="%28%3cactinic%3avariable%20name%3d%22SectionNamePrev%22%20%2f%3e%20%21%3d%20%22%22%29" ><li></actinic:block>

            <a href="<actinic:variable name="SectionPageName"/>">
            <actinic:block if="%3cactinic%3avariable%20name%3d%22SectionName%22%2f%3e%3d%3d%3cactinic%3avariable%20name%3d%22MainSection%3a%3aSectionName%22%2f%3e"><span class="highlight"></actinic:block>
            <actinic:variable name="SectionName" />
            <actinic:block if="%3cactinic%3avariable%20name%3d%22SectionName%22%2f%3e%3d%3d%3cactinic%3avariable%20name%3d%22MainSection%3a%3aSectionName%22%2f%3e"></span></actinic:block></a>

            <actinic:block if="%28%3cactinic%3avariable%20name%3d%22SectionNameNext%22%20%2f%3e%20%3d%3d%20%22%22%29%20AND%20%28%3cactinic%3avariable%20name%3d%22SectionLevel%22%20%2f%3e%20%3d%3d%202%29" ></li></ul></li></actinic:block>

            </actinic:block>

            Hope this helps!

            Roger
            Roger Coathup
            Principal Consultant, 21 Thoughts Limited: futures inspired business consultancy
            Director, 21 Inspired Limited: website design and online services

            Comment


              #21
              sadly roger, this code produces a mess of htm for me.

              HTML Code:
              <li>
              <a href="P_actinic_plugins_actinet_multiuser.html">
              <span class="highlight">
              Actinet
              </span></a>
              <ul><li>
              <a href="P_actinic_plugins_actinet.html">
              Plugins
              </a>
              </li></ul></li>
              <li>
              <a href="P_Actifeed.html">
              Actifeed
              </a>
              </li>
              (extra line breaks removed)

              you need some more uls around those li's

              Comment


                #22
                Hi Roger - sorry my code didn't work for you. When I use it I get the following - which looks spot on...
                Code:
                <ul><li>
                
                <a href="P_Books.html">Books</a>
                
                
                
                
                </li>
                
                <li>
                <a href="P_Clothing.html">Clothing</a>
                
                
                
                
                
                <ul><li>
                
                <a href="P_Shoes.html">Shoes</a>
                
                
                
                
                </li>
                
                <li>
                <a href="P_Shoes_2.html">Shoes 2</a>
                </li></ul>
                
                
                
                </li>
                
                <li>
                <a href="P_Homeware.html">Homeware</a>
                
                
                
                
                </li>
                
                <li>
                <a href="P_Computers.html">Computers</a>
                
                
                
                
                </li>
                
                <li>
                <a href="P_Stationery.html">Stationery</a>
                
                
                
                
                </li>
                
                <li>
                <a href="P_Best_Sellers.html">Best Sellers</a>
                
                
                
                
                </li>
                
                <li>
                <a href="P_New_Products.html">New Products</a>
                
                </li></ul>

                Comment


                  #23
                  Hi Gabriel,

                  yes, I explicitly put a <ul></ul> round the entire code section.

                  Otherwise, your html looks ok to me; everything is matched and closed in the correct order.

                  Roger
                  Roger Coathup
                  Principal Consultant, 21 Thoughts Limited: futures inspired business consultancy
                  Director, 21 Inspired Limited: website design and online services

                  Comment


                    #24
                    Chris,

                    your code failed for me when it was the last parent section that has the subsections, e.g.

                    section 1
                    section 2
                    section 3
                    subsection 3.1
                    subsection 3.2

                    Did you try that?

                    Roger
                    Roger Coathup
                    Principal Consultant, 21 Thoughts Limited: futures inspired business consultancy
                    Director, 21 Inspired Limited: website design and online services

                    Comment


                      #25
                      Yep - I can see the problem. I'm having a fiddle with the code now to try and get it to work. The other code at the start of the thread works up to two levels of sections - I'm just trying to see if there is something that will work for all section depths. I'm not having much luck at the moment...

                      Comment


                        #26
                        Originally posted by markHPP

                        Update 1: 10/10/2007, should work now. The method is a bit backwards as you can see with the </li> but because of the condition around it, it only renders where needed.
                        Update 2: 10/10/2007, thanks NormanRouxel! </li> on final top-level section added, I missed that!

                        Code:
                        <ul id="sectionListSide">
                        <actinic:block type="EntireSectionList">
                        <actinic:block if="%28%3cactinic%3avariable%20name%3d%22SectionNamePrev%22%20%2f%3e%20%21%3d%20%22%22%29"></li></actinic:block>
                        <actinic:block if="%28%3cactinic%3avariable%20name%3d%22SectionNamePrev%22%20%2f%3e%20%3d%3d%20%22%22%29%20AND%20%28%3cactinic%3avariable%20name%3d%22SectionLevel%22%20%2f%3e%20%3d%3d%202%29" ><ul></actinic:block>
                        <li<actinic:block if="%3cactinic%3avariable%20name%3d%22SectionID%22%20%2f%3e%20%3d%3d%20%3cactinic%3avariable%20name%3d%22MainSection%3a%3aSectionID%22%20%2f%3e"> id="currentPage"</actinic:block>><a href="<actinic:variable name="SectionPageName"/>"><actinic:variable name='SectionName'/></a>
                        <actinic:block if="%28%3cactinic%3avariable%20name%3d%22SectionNameNext%22%20%2f%3e%20%3d%3d%20%22%22%29%20AND%20%28%3cactinic%3avariable%20name%3d%22SectionLevel%22%20%2f%3e%20%3d%3d%202%29" ></li></ul></actinic:block>
                        <actinic:block if="%3cactinic%3avariable%20name%3d%22ListIndex%22%20%2f%3e%20%3d%3d%20%3cactinic%3avariable%20name%3d%22ListCount%22%20%2f%3e" >
                        </actinic:block>
                        </ul>
                        I think there is a bit missing? A /block from somewhere and there is an empty condition at the end.

                        Comment


                          #27
                          Very odd... not sure how I managed to miss the thing I was apparently fixing... it should be...

                          Code:
                          <ul id="sectionListSide">
                          <actinic:block type="EntireSectionList">
                          <actinic:block if="%28%3cactinic%3avariable%20name%3d%22SectionNamePrev%22%20%2f%3e%20%21%3d%20%22%22%29"></li></actinic:block>
                          <actinic:block if="%28%3cactinic%3avariable%20name%3d%22SectionNamePrev%22%20%2f%3e%20%3d%3d%20%22%22%29%20AND%20%28%3cactinic%3avariable%20name%3d%22SectionLevel%22%20%2f%3e%20%3d%3d%202%29" ><ul></actinic:block>
                          <li<actinic:block if="%3cactinic%3avariable%20name%3d%22SectionID%22%20%2f%3e%20%3d%3d%20%3cactinic%3avariable%20name%3d%22MainSection%3a%3aSectionID%22%20%2f%3e"> id="currentPage"</actinic:block>><a href="<actinic:variable name="SectionPageName"/>"><actinic:variable name='SectionName'/></a>
                          <actinic:block if="%28%3cactinic%3avariable%20name%3d%22SectionNameNext%22%20%2f%3e%20%3d%3d%20%22%22%29%20AND%20%28%3cactinic%3avariable%20name%3d%22SectionLevel%22%20%2f%3e%20%3d%3d%202%29" ></li></ul></actinic:block>
                          <actinic:block if="%3cactinic%3avariable%20name%3d%22ListIndex%22%20%2f%3e%20%3d%3d%20%3cactinic%3avariable%20name%3d%22ListCount%22%20%2f%3e"></li></actinic:block>
                          </actinic:block>
                          </ul>
                          ...i think... I've gone on not to use this method in the site I'm working on and thus deleted everything to do with it. It wasn't exactly an ideal solution that I was going for. I was trying to get Actinic to work out where it was with Javascript and CSS but since got it to work without any external fudging (now with internal fudging!).

                          Thanks
                          Mark

                          Comment


                            #28
                            I've modified code to produce a horizontal Top Level Section List.

                            Is there a way I can make a drop-down sub-section list on hovering over a section name?

                            Alan


                            Code:
                            <actinic:block type="TopLevelSectionList">
                            <actinic:block if="%3cactinic%3avariable%20name%3d%22SectionNamePrev%22%20%2f%3e%20%21%3d%20%22%22" ></actinic:block>
                            <actinic:block if="%3cactinic%3avariable%20name%3d%22SectionNamePrev%22%20%2f%3e%20%3d%3d%20%22%22" ></actinic:block>
                            <actinic:block if="%28%3cactinic%3avariable%20name%3d%22SectionNamePrev%22%20%2f%3e%20%21%3d%20%22%22%29"></actinic:block>
                            <a href="<actinic:variable name="SectionPageName"/>"><actinic:variable name='SectionName'/></a>
                            <actinic:block if="%3cactinic%3avariable%20name%3d%22SectionNameNext%22%20%2f%3e%20%3d%3d%20%22%22" ></actinic:block>
                            
                            </actinic:block>

                            Comment


                              #29
                              I'm using the code presented here to generate a side list. However, being a novice with this I wondered if there is a way to split my list and add additional headers.

                              Purely for user clarity I would like to add some large headers before some products...

                              Here is my composite - the left hand side shows what I want to achieve with my section list.

                              Is there a way to do this?

                              Comment


                                #30
                                It is possible Ben, have a read of this, see if this sheds any light on how to do it. This is the same principle as what you need to do for your situation.

                                You can create your own headers or have them as TLS's to make it dynamic. You can check sectionLevel out in actinic, so that tells you the depth of where you are, once you know the depth and thus the level the section sits at, you can then apply styles accordingly and it will be dynamic as you add/remove sections.

                                Try at all costs to not go for the manual route, if you find that is the only way you can do it, then pay someone to do it properly for you.

                                Comment

                                Working...
                                X