Announcement

Collapse
No announcement yet.

Hard Coding Navigation

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

    Hard Coding Navigation

    I am currently using a navigation bar which is refereed to I believe as Yahoo sections.

    Is it possible to change this menu so that it doesn't access the pages via the CGI bin but goes straight to the page as though it was hard coded.

    The reason being that linking through the CGI bin is dramatically slowing the site down. Hard coded links are instant but CGI links can on some occasions take up to 10 seconds.

    Any help would be appreciated.

    Kind regards

    Jason
    Regards

    Jason

    Titan Jewellery (Swift Design)
    Zirconium Rings
    Damascus Steel Rings

    #2
    In addition to the above I have noticed that under network settings where it says

    Path from CGI-BIN to acatalog directory as viewed by the FTP server (leave blank unless advised)

    I have /acatalog/ entered in the box and use passive FTP transfers ticked.

    Could any of the above be the culprit?

    Kind regards

    Jason
    Regards

    Jason

    Titan Jewellery (Swift Design)
    Zirconium Rings
    Damascus Steel Rings

    Comment


      #3
      Is it possible to change this menu so that it doesn't access the pages via the CGI bin but goes straight to the page as though it was hard coded.
      you will have to change the navigation to a different type, see the advanced user guide that describes all the navigation options available

      Comment


        #4
        Many thanks Jo, I have found the section on page 36 of the design manual.

        It would appear that the file that creates the url's is Act_section_tree.js

        Would it be possible to edit this file so that it generates hard coded links instead of links that navigate through the CGI-BIN?

        I know that this will affect customer accounts but as I don't really use these it would be a small price to pay.

        Any suggestions?

        Many thanks

        Jason
        Regards

        Jason

        Titan Jewellery (Swift Design)
        Zirconium Rings
        Damascus Steel Rings

        Comment


          #5
          If you're a Catalog site you can tweak this so that the links are direct to the pages. If you are a Business site you'll probably have to go through the cgi-bin so don't use.

          Look in Act_Primary.html (back it up first) for the code
          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)
              {
              strIDs += '<a href="' + ar[i].sURL + '"><span class="actxxsmall"><b><font color="NETQUOTEVAR:FGCOLORCSS">' + ar[i].sName + '</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)
                      {
                      strIDs += '<a href="' + ar[i].pChild[j].sURL + '"><span class="actxxsmall"><font color="NETQUOTEVAR:FGCOLORCSS">' + ar[i].pChild[j].sName + '</font></span></a><br>';
                      }
                    }
                  }
                }
              strIDs += '<br>'
              }
            }
          return strIDs
          }
          //-->
          </SCRIPT>
          replace it with

          Code:
          <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
          <!--
          function directURL(link){	// extract page name from lines like http://mega/cgi-bin/ss000747.pl?SECTIONID=Basic%5fProducts%2ehtml&NOLOGIN=1
            if ( link.indexOf('Act_PreviewWarningPage') > -1 ) return link;	// no change if previewing
            var mainpath = 'NETQUOTEVAR:BASEHREF';	// path to site
            if ( mainpath.indexOf('/acatalog/') == -1 ) mainpath = mainpath + 'acatalog/'; // fix brochure home page
            return mainpath + link.replace(/.*SECTIONID=(.*)&NOLOGIN=1/i, '$1');
          }
          
          function YahooSections(ar)
          {
          var strIDs = '';
          for (var i=1;i<=ar.length;i++)
            {
            if (ar[i].sURL != null)
              {
              strIDs += '<a href="' + directURL(ar[i].sURL) + '"><span class="actxxsmall"><font color="NETQUOTEVAR:FGCOLORCSS">' + ar[i].sName + '</font></span></a><br>';
                {
                if (ar[i].pChild)
                  {
                  for (var j=1;j<=ar[i].pChild.length;j++)
                    {
                    if (ar[i].pChild[j].sURL != null)
                      {
                      strIDs += '<a href="' + directURL(ar[i].pChild[j].sURL) + '"><span class="actxxsmall"><font color="NETQUOTEVAR:FGCOLORCSS">' + ar[i].pChild[j].sName + '</font></span></a><br>';
                      }
                    }
                  }
                }
              strIDs += '<br>'
              }
            }
          return strIDs
          }
          //-->
          </SCRIPT>
          Also do the same for Act_BrochurePrimary.html.
          Norman - www.drillpine.biz
          Edinburgh, U K / Bitez, Turkey

          Comment


            #6
            Many thanks Norman.

            I am unable to find the code to replace. I am using your Collapso menu so this code must be different from that above.

            I am using Business but will try it on a test server first.

            Kind regards

            Jason
            Regards

            Jason

            Titan Jewellery (Swift Design)
            Zirconium Rings
            Damascus Steel Rings

            Comment


              #7
              If you're using customer accounts, you'll have to stick with the cgi-bin type links. They are needed to keep the customer logged in.
              Norman - www.drillpine.biz
              Edinburgh, U K / Bitez, Turkey

              Comment


                #8
                Originally posted by NormanRouxel
                If you're using customer accounts, you'll have to stick with the cgi-bin type links. They are needed to keep the customer logged in.
                Hi Norman
                I am just starting to try to set up customer accounts and have a hard-coded 'relative' menu. Would you be able to tell me what the relative code should be for my hard-coding so that the menus will work with both logged-in customers and non-logged-in please?
                Regards
                Richard
                Richard
                www.worldofenvelopes.com

                Comment


                  #9
                  Hi Richard,

                  This article here:

                  http://knowledge.actinic.com/acatalo...ic.html#aKB698

                  Contains info and an example on how to correctly hardcode links.

                  I just used…

                  <a href="/cgi-bin/ss000001.pl?SECTIONID=Books%2ehtml&NOLOGIN=1">click</a>

                  …on my test site
                  Regards,

                  Toby Blanchard

                  Comment

                  Working...
                  X