Announcement

Collapse
No announcement yet.

displaying 2nd lot of sub sections in Smart Theme?

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

    displaying 2nd lot of sub sections in Smart Theme?

    I have been trying to get a second lot of subsections to display in the smart theme, but seem to be going wrong somewhere

    the website is http://www.beanbagsandrefill.com/acatalog/index.html

    I would like the store sections at the top left to display like this

    Bean Bags
    - - - - Choose by Fabric
    - - - - - - - - Faux Leather

    The code that I copied and pasted out of the advanced guide has ended up at the bottom left of the screen, have I pasted the code in the wrong place or am I pasting completly the wrong code?

    #2
    The bit under Store Sections seems to be working as expected.

    If you want some indentation then change
    Code:
    strIDs += '<a href="' + ar[i].pChild[j].sURL + '"><span class="actxxsmall"><font color="#000000">' + ar[i].pChild[j].sName + '</font></span></a><br>';
    to be
    Code:
    strIDs += '<a href="' + ar[i].pChild[j].sURL + '"><span class="actxxsmall"><font color="#000000">--' + ar[i].pChild[j].sName + '</font></span></a><br>';
    This code you've used only shows 2 levels. If you want a 3rd, then search this Forum for something likeYahooSections 3rd level
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      It looks as though you have put the code in the wrong place.

      Cut this code from where you currently have it
      Code:
      <script language=Javascript1.1>document.write(SectionList(section_tree))</script>
      and paste it where you find this code
      Code:
      <script language=Javascript1.2>
      document.write(YahooSections(section_tree)) 
      </script>
      Make sure you overwrite or delete all the YahooSections code, you do not need both.
      Bill
      www.egyptianwonders.co.uk
      Text directoryWorldwide Actinic(TM) shops
      BC Ness Solutions Support services, custom software
      Registered Microsoft™ Partner (ISV)
      VoIP UK: 0131 208 0605
      Located: Alexandria, EGYPT

      Comment


        #4
        It works! (Thank you)

        But the main central page has gone really wide and dropped down below all the section boxes I have tried copying and pasting the code several times but keep getting the same result :-(

        Also is it possible to make the top sections in the sections list bold again?

        Comment


          #5
          To make the top section bold, just add in the bolding tags either side of the top section name in the list building code (or to make it easier just replace the existing SectionList code in the HEAD of the page with this)
          Code:
          <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"><b>' + ar[i].sName +  '</b></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>
          Not sure what is causing the line feed that is forcing the rest of the page content down, but you could try splitting the insertion code into three lines, like this
          Code:
          <script language=Javascript1.1>
          document.write(SectionList(section_tree))
          </script>
          Bill
          www.egyptianwonders.co.uk
          Text directoryWorldwide Actinic(TM) shops
          BC Ness Solutions Support services, custom software
          Registered Microsoft™ Partner (ISV)
          VoIP UK: 0131 208 0605
          Located: Alexandria, EGYPT

          Comment


            #6
            It seems to be because the store sections box is slightly wider than it was (although it doesnt need to be) which is pushing the centre page down to the bottom, do you know the file to adjust the border or size of the store sections so I can make it smaller again?

            Thanks

            Comment


              #7
              In the same sectionlist Javascript code in the head, change
              Code:
              strIDs += '<table><tr><td width="20"></td><td><a href="' + ar[i].pChild[j].pChild[k];
              
              to read
              
              strIDs += '<table><tr><td width="10"></td><td><a href="' + ar[i].pChild[j].pChild[k]
              that MIGHT help, but if not, it may mean re-writing the whole script to control the column widths.
              Last edited by wjcampbe; 27-Mar-2006, 12:21 PM. Reason: sort the code tag
              Bill
              www.egyptianwonders.co.uk
              Text directoryWorldwide Actinic(TM) shops
              BC Ness Solutions Support services, custom software
              Registered Microsoft™ Partner (ISV)
              VoIP UK: 0131 208 0605
              Located: Alexandria, EGYPT

              Comment


                #8
                I cant actually find that piece of the code in the file but I will have a search through the forum to see if I can find another soloution.

                It seems everytime I get one thing looking good it changes something else

                Comment


                  #9
                  It's the same piece of code you needed to change to make the top section bold.

                  It is just before the </HEAD> tag in Act_Primary.html.....
                  Bill
                  www.egyptianwonders.co.uk
                  Text directoryWorldwide Actinic(TM) shops
                  BC Ness Solutions Support services, custom software
                  Registered Microsoft™ Partner (ISV)
                  VoIP UK: 0131 208 0605
                  Located: Alexandria, EGYPT

                  Comment


                    #10
                    Does anyone know another working soloution that will display 2 lots of the sub sections, possibly using a "click" and drop down option?

                    I am tearing my hair out trying to get the soloution listed in the advanced guide to work :-(

                    Comment


                      #11
                      If you mean you want the YahooSections code expanded to show a third level, then such a patch is already on this (or the V6) forums somewhere.
                      Norman - www.drillpine.biz
                      Edinburgh, U K / Bitez, Turkey

                      Comment

                      Working...
                      X