Announcement

Collapse
No announcement yet.

Adding jpg's as menu section title

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

    Adding jpg's as menu section title

    Hi

    I want to do something that should be quite basic: I want to add a section, but have a jpg shown in the menu box, as opposed to a 'text' listing.
    I havn't explained that very well, so here is the context: Underneath my left hand section menu (but within the menu box) I want to add some of my manufacturers logos, which then links to a section just with their products in it. Obviously I know how to add a section, but I don't know how to include the image, as opposed to text in the menu.
    Any help - greatly appreciated.

    Thanks - Nick
    www.thperfectpad.co.uk
    Trying to squeeze my moneys worth out of V7 - but not for much longer!

    #2
    Isn't your left hand navigation created on the fly with Javascript? So adding random images there is probably going to be impossible.

    I would be wary of adding images to the left hand menu - at the moment the homepage sits nicely without a fold (scroll) - adding images may force this down and a vertical scroll which would be a shame. What about adding another box underneath "light up your life" with the manufacturers logo's there?


    Bikster
    SellerDeck Designs and Responsive Themes

    Comment


      #3
      Isn't your left hand navigation created on the fly with Javascript? So adding random images there is probably going to be impossible.
      Jonty's reply here is correct. I can't see a way to do this unless you hand code your navigation.

      Comment


        #4
        Too complicated - I'll find an easier solution!
        Thanks - Nick
        Trying to squeeze my moneys worth out of V7 - but not for much longer!

        Comment


          #5
          You can include section images in the javascript section list and I am sure the code is in the AUG.

          This would be for all the sections.
          Owner of a broken heart

          Comment


            #6
            The Section image is available as Gary pointed out. E.g. in the generated Act_section_tree.js file you'll see:

            section_tree[1].sImage = "section_image.gif";


            You could display it conditionally by testing the image name for some meaningful letters. E.g. if it contains logo- then display it instead of the text. Here's some untested code that would do it.
            Code:
            <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
            <!--
            function YahooSections(ar)
            {
            var strIDs = '';
            for (var i=1;i<=ar.length;i++)
              {
              if (ar[i].sURL != null)
                {
                var sectionname = ar[i].sName;
                if ( ar[i].sImage.indexOf('logo-') > -1 ) sectionname = ar[i].sImage;  
                strIDs += '<a href="' + ar[i].sURL + '"><span class="actxxsmall"><b><font color="NETQUOTEVAR:FGCOLORCSS">' + sectionname + '</font></b></span></a><br>';
                  {
                  if (ar[i].pChild)
                    {
                    for (var j=1;j<=ar[i].pChild.length;j++)
                      {
                      if (ar[i].pChild[j].sURL != null)
                        {
                        sectionname = ar[i].pChild[j].sName;
                        if ( ar[i].pChild[j].sImage.indexOf('logo-') > -1 ) sectionname = ar[i].pChild[j].sImage;
                        strIDs += '<a href="' + ar[i].pChild[j].sURL + '"><span class="actxxsmall"><font color="NETQUOTEVAR:FGCOLORCSS">' + sectionname + '</font></span></a><br>';
                        }
                      }
                    }
                  }
                strIDs += '<br>'
                }
              }
            return strIDs
            }
            //-->
            </SCRIPT>
            Norman
            Norman - www.drillpine.biz
            Edinburgh, U K / Bitez, Turkey

            Comment

            Working...
            X