Announcement

Collapse
No announcement yet.

Best approach for a subsection only list?

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

    Best approach for a subsection only list?

    I have my 3 top level sections in tabs in the outer layout, and I when the user clicks a tab, I want them to be presented with a subsection list in the outer layout (i.e. the subsection list for that TLS only, and not showing the top level sections either.). Only way out to other TLSs will be through the tabs, which are common to all outer layouts.

    Looking at the Advanced User Guide, Javascript may be an option, but I'd like to avoid JS if possible.

    I can see SubSectionListTop variable name, but I suspect that this needs to be within inner layout?
    adaptive-image.co.uk

    #2
    Have found block: EntireSectionList, am now trying to set my current page 'Department' to a variable that I can compare against each Section department when going through the section list, to exclude subsections from other departments, to avoid the need for a separate layout for each department using a static department name.

    Hmm. Is there a way within the EntireSectionList loop to refer to variables within the containing page, or do I need to assign to a PHP variable and incorporate that in the loop?
    Last edited by dandelion; 03-May-2012, 07:47 AM. Reason: more info
    adaptive-image.co.uk

    Comment


      #3
      Ah, that looks better. Thank you. Do you know if there is a resource anywhere that lists all of the available blocks, variables, etc with usage contexts. I have been away from Actinic for a while, and am struggling (a little) to find what I need in the AUG etc.
      adaptive-image.co.uk

      Comment


        #4
        The Actinic built-in Help has a Variable Reference Guide that describes most variables and also breaks them down by usage.
        Norman - www.drillpine.biz
        Edinburgh, U K / Bitez, Turkey

        Comment


          #5
          OK, cracked it. Needed EntireSectionList (not ChildSectionList) so that level 2 sections are shown on level 3 and below pages.

          Thanks to Normans post here, and various others:

          A PHP variable in page header captures the department name (inherited per department on all child pages from the level 1 department section)
          Code:
          <actinic:block php="true" >
            $pageDept = '<actinic:variable name="_AI_Department" encoding="perl" selectable="false" />';
          </actinic:block>
          Then in the relevant place in the outer layout, cycle through all sections and show only those in the correct department AND at level 2.
          Code:
          <ul>         
            <actinic:block type="EntireSectionList">
              <actinic:block php="true" >
                if (<actinic:variable name="SectionLevel" encoding="perl" selectable="false" /> == 2 && 
                    '<actinic:variable name="_AI_Department" encoding="perl" selectable="false" />' == $pageDept) 
                {
                  echo "<li><a href=\"<actinic:variable name='SectionPageName' encoding='perl' selectable='false' />\" target=\"_self\">
                               <actinic:variable name='SectionName' encoding='perl' selectable='false' />
                        </a></li>";
                }
              </actinic:block>
            </actinic:block>
          </ul>
          Thanks to all who helped, directly or through older posts..
          adaptive-image.co.uk

          Comment


            #6
            SectionLevel == 2

            would do this, i've used that myself for years. Define a variable against each TLS and show a menu on the page according to that variable. Define a body ID if you want to have the current tab shown as the active one also. Standard actinic functions will do this, just the Blocks and Blockifs is all you need.

            Comment

            Working...
            X