Announcement

Collapse
No announcement yet.

How do I show specific level 2 sections lists

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

    How do I show specific level 2 sections lists

    How do I go about showing only specific level 2 section lists?

    I have got as far as (using Gabe Crowe's tutorial)

    Code:
    <li><ul>
    <actinic:block type="EntireSectionList">
    <actinic:block if="%3cactinic%3avariable%20name%3d%22SectionLevel%22%20%2f%3e%20%3d%3d%20%202" >
    <li><a href="<actinic:variable name="SectionPageName"/>"><actinic:variable name='SectionName'/></a>
    </actinic:block>
    </actinic:block>
    </ul></li>
    Which gives me a list of all the level 2 sections. How do I go about showing only say the top 3 of the list or the bottom 3 for example.

    In another of Gabe's tutorials http://community.actinic.com/showthread.php?t=35127 there was something similar that he did with new product lists, im just having problems doing it with sections.

    Any help would be appreciated.

    #2
    If you set up a true/false variable you can put a block around the Section lists and choose which sections are permitted.

    This Tutorial will walk you through it.

    Rather than using True as the default use false. Set the blockif to false and then any section you want to show make "true".

    Let me know how far you get and if you have any issues.

    Army Gore-tex
    Winter Climbing Mitts
    webD's Blog: Website design, SEO and other ramblings…
    Twitter LinkedIN

    If you think a post is good, rate it!

    Find the answers in the Knowledge Base | Have you read the User Guides

    Comment


      #3
      Thanks webD,

      I did have a go, but it doesnt quite work the way I need.

      What I need is to be able to show different parts of the section 2 list in two seperate areas of the page (but on the same page) in the 'Outer Layer'

      The way I was thinking is to use the code from previous post in 2 or 3 different areas of the page. Each with a differnent BLOCK IF to specify which items of the 2nd level list to show.

      Example

      At the top of the page i want to be able to show just say the first 5 of the 2nd level section list.

      On the left I want to show the next 5 (6-10 of the list)

      And at the bottom I want the last 5.

      Gabe Crowe's Tutorial Code

      The 2nd of Gabe Crowe's tutorials describes and produces the exact results I require perfectly. But this is for a New Products List and not a 2nd level list.

      Gabe's Code
      Code:
      <actinic:block type="NewProductsList" >
      <actinic:block if="%3cactinic%3avariable%20name%3d%22ListIndex%22%20%2f%3e%20%3c%3d%203" >
      	<img src="<actinic:variable name="ProductImageFileName" />" width="75" alt="<actinic:variable name="ProductName" />" border="0" /><br>
      	<a href="<actinic:variable name="SearchCGIURL" />?PRODREF=<actinic:variable name="ProductReference" />&amp;NOLOGIN=1<actinic:block if="%3cactinic%3avariable%20name%3d%22IsHostMode%22%20%2f%3e">&amp;SHOP=<actinic:variable name="ShopID" /></actinic:block>">
      	<Actinic:Variable Name="ProductName"/>
      	</a><br>
      	<br>
      </actinic:block>
      </actinic:block>
      I am trying to use the ListIndex for my list, but it doesnt matter which number I specify it only shows the first item on the list.

      How do I adapt this for my situation?

      Comment


        #4
        Why are you running on the new products list? surely you need to run on the entire section list?

        Comment


          #5
          I think a URL, screen prints and the code you are using may be needed here.

          As Lee says you'll need to use the entire section list, but I assumed that code you posted was from Gabe's tutorial, not your site?

          Army Gore-tex
          Winter Climbing Mitts
          webD's Blog: Website design, SEO and other ramblings…
          Twitter LinkedIN

          If you think a post is good, rate it!

          Find the answers in the Knowledge Base | Have you read the User Guides

          Comment


            #6
            Yes, the code shown in the above post was from Gabe's tutorial, not from my site.

            My code is -

            Code:
            <actinic:block type="EntireSectionList">
            <actinic:block if="%3cactinic%3avariable%20name%3d%22ListIndex%22%20%2f%3e%20%3c%3d%205" >	
            <actinic:block if="%3cactinic%3avariable%20name%3d%22SectionLevel%22%20%2f%3e%20%3d%3d%20%202" >
                 <li><a href="<actinic:variable name="SectionPageName"/>"><actinic:variable name='SectionName'/></a>
            </actinic:block>
            </actinic:block>
            </actinic:block>
            Where I want to show the first 5 items of the Section list, which displays only sections at level 2.

            This results in only the first of the list being shown.

            Comment


              #7
              Merge your blockif conditions for starters, there's an 'and' so you can have as many as you like in one.

              Comment


                #8
                Thanks,

                Ive done that now.

                But I can still only get it show either - None, 1 or All of the list.

                Code:
                <actinic:variable name="SectionLevel" /> == 2  AND <actinic:variable name="ListIndex" /> >=  1 AND <actinic:variable name="ListIndex" /> <= 5
                Should this show me the first 5. As at the moment it only shows me the first of the list.

                Comment


                  #9
                  Attack it the other way, get the full list showing and then filter via blockifs if you're getting problems. You're not confirming anything along the way or sure of anything you add the way you are working. I suspect that your level 2 condition is what's screwing you, i think what you want to show is what is inside and that is level 3, but that may well be conjecture on my part. You also have the child section list block at your disposal, i could provide more precise instructions if i fully understood what you want to do, i'm not sure i do so far.

                  Comment


                    #10
                    If I take out the SectionLevel == 2 Out of the Block If, it shows me a list of 5 but obviously without the SectionLevel bit it shows first 5 items of the entire list Top, 2nd and 3rd Levels.

                    So it is clear that the problem occurs when you only specify SectionLevel. Is there a way round this, another way to specify a particular section?

                    Comment


                      #11
                      If you only intend to display top and second level sections then using EntireSectionList may not be very efficient. If you have 1000 sections in all you'll be going through 1000 operations on 1000 pages leading to a 1,000,000 iterations when building the site.

                      Consider using
                      Code:
                      <actinic:block type="TopLevelSectionList">
                      	TOP LEVEL CODE HERE
                      	<actinic:block type="ChildSectionList">
                      		SECOND LEVEL CODE HERE
                      	</actinic:block>
                      </actinic:block>
                      This will also make it easier to put Conditions around things as you'll always be clear which level you're on.
                      Norman - www.drillpine.biz
                      Edinburgh, U K / Bitez, Turkey

                      Comment


                        #12
                        Thanks, I think ive figured it. Lee was on the right track.

                        It is only the 2nd Level l was intersted in

                        Comment


                          #13
                          Actually I have gone back and had another look and NormanRouxel has given me what i needed. Thanks Norman

                          I just needed to lat it in a different way.

                          Just one final question (hopefully!)

                          Code:
                          <actinic:block type="TopLevelSectionList">
                          <a href="#"><actinic:variable name='SectionName'/></a>
                          	<actinic:block type="ChildSectionList">
                                   <a href="<actinic:variable name="SectionPageName"/>"><actinic:variable name='SectionName'/></a>
                          	</actinic:block>
                          </actinic:block>
                          Im wanting to put he above into a little bit of a navigation, ussing css. Im having a few problems with where to put the list tags in and around the Actinic Blocks.

                          The code below is part of a nice collapseble menu using css, with the Top Level Section link expanding to the Child sections/level 2 sections. The CSS works without the Actinic blocks and using normal html.

                          Code:
                          <li><a href="#">Top Level Section</a>
                              <ul>
                                  <li><a href="">Child Section</a></li>
                              </ul>
                          </li>
                          Thanks

                          Comment


                            #14
                            Show us where you've got to so far then and we can just correct that. What's not occurring that you want to happen?

                            Comment


                              #15
                              Code:
                               
                              <ul id="NavigationMenu">
                              
                              <li><actinic:block type="TopLevelSectionList">
                              <a href="#"><actinic:variable name='SectionName'/></a>
                              	<ul><li><actinic:block type="ChildSectionList">
                              		<a href="<actinic:variable name="SectionPageName"/>"><actinic:variable name='SectionName'/></a>
                              	</actinic:block></li></ul>
                              </actinic:block></li>
                              
                              </ul>
                              The code above produces...



                              The 'Gut Supplement' cell expands perfectly as it should when clicked, but the others are permanently expanded.

                              Comment

                              Working...
                              X