Announcement

Collapse
No announcement yet.

section tree - sub sections and products not showing

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

    section tree - sub sections and products not showing

    for some reason the section tree only shows the top level sections and sub-section1, it does not show sub-section2 or the products (the latter I'm not concerned with - but would be nice to know!)

    e.g. in actinic the catalogue is set up as follows...

    catalog
    boys
    hoodies
    hats
    combo hats
    laplander hats
    ski hats
    blankets

    only the sections in bold are displayed - how can I display the others?
    (have customised the templates - but haven't touched the section tree script!)
    (have been through other threads and looked at the advanced guide - but can't figure this out!)

    see http://www.cuddlezoo.co.uk/acatalog if it helps?

    thanks in anticipation
    damian

    #2
    As far as I can remember the smart template uses the yahoo menu which only displays sections and sub-section 1 which is why sub-section 2 and products are not showing.

    If you want a more detailed menu have a look at http://www.drillpine.biz/actinicstuff

    Comment


      #3
      If you're using the default YahooSections function, this will only display the parent and one subsection (according to the v7 advanced user guide - p40 last paragraph)

      However the guide does contain other snippets allowing you to go further down the tree. One in particular allows you to create a drop down to three levels of depth as you require. It should be fairly easy to modify the script to generate hyperlinks rather than a drop-down.

      HTH
      Chris
      -----
      http://www.livingaidsonline.co.uk

      Comment


        #4
        Note to self - read guide more carefully. I think this should do the trick, rather than modifying the drop down! Taken from said guide:

        Creating a List of Hyperlinks with Sections and Two Levels of Sub-sections

        This code will lay out your sections and two levels of sub-sections within a list of hyperlinks. The sub-sections will appear indented. Paste the following code within the <HEAD></HEAD> tags of your Overall Layout template:

        Code:
        <!--@act NETQUOTEVAR:SECTIONTREE_RAW -->
        <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
        <!--
        function SectionList(ar)
        {
        var strIDs = '<table border=0 width=95% cols=2>';
        for (var i=1;i<=ar.length;i++)
        {
        if (ar[i].sURL !=null)
        {
        strIDs += '<table><tr><td colspan=2><a href="' + ar[i].sURL + '"><span
        class="actxxsmall">' + ar[i].sName + '</span></a></td></tr></table>';
        {
        if (ar[i].pChild)
        {
        for (var j=1;j<=ar[i].pChild.length;j++)
        {
        strIDs += '<table><tr><td><img src=shim.gif width=5></td><td><a href="' +
        ar[i].pChild[j].sURL + '"><span class="actxxsmall">' + ar[i].pChild[j].sName +
        '</span></a></td></tr></table>';
        {
        if (ar[i].pChild[j].pChild)
        {
        for (var k=1;k<=ar[i].pChild[j].pChild.length;k++)
        {
        strIDs += '<table><tr><td width="20"></td><td><a href="' +
        ar[i].pChild[j].pChild[k].sURL + '"><span class="actxxsmall">' +
        ar[i].pChild[j].pChild[k].sName + '</span></a></td></tr></table>';
        }
        }
        }
        }
        }
        }
        }
        }
        strIDs += '</table>'
        return strIDs
        }
        //-->
        </SCRIPT>
        and this bit to go into the main body:
        Code:
        <script language=Javascript1.1>document.write(SectionList(section_tree))
        </script>
        <script language=Javascript1.1>document.write(SectionList(section_tree))
        </script>
        Chris
        -----
        http://www.livingaidsonline.co.uk

        Comment

        Working...
        X