Announcement

Collapse
No announcement yet.

Multi column brochure code change

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

    Multi column brochure code change

    The fix given in the knowledge base and the advanced manual reads in part

    Code:
    Then edit the code of your chosen fragment layout template and replace it with:
    
    ----------------------------------------------
    
    <script language=JavaScript>
    <!--
    if ( currentcol++ == 0 ) document.write('<tr><td colspan=3><table border=0><tr>');
    document.write('<td width="' + colwidth + '%" valign=top>');
    // -->
    </script>
    
    <noscript><tr><td width="100%"></noscript>
    
    NETQUOTEVAR:FRAGMENTANCHOR                 <===========  original position
    <table border="0" width="100%" cellpadding="5" cellspacing="1">
      <tr>
        <td valign="top" align="left">NETQUOTEVAR:BROCHURE_IMAGE</td>
      </tr>
    this results in a top left column with no preceding FRAGMENTANCHOR line, while the other columns do have the line above them.

    If I change the order of the code thus

    Code:
    Then edit the code of your chosen fragment layout template and replace it with:
    
    ----------------------------------------------
    
    NETQUOTEVAR:FRAGMENTANCHOR       <======== moved
    <script language=JavaScript>
    <!--
    if ( currentcol++ == 0 ) document.write('<tr><td colspan=3><table border=0><tr>');
    document.write('<td width="' + colwidth + '%" valign=top>');
    // -->
    </script>
    
    <noscript><tr><td width="100%"></noscript>
    
    <table border="0" width="100%" cellpadding="5" cellspacing="1">
      <tr>
        <td valign="top" align="left">NETQUOTEVAR:BROCHURE_IMAGE</td>
      </tr>
    I get the FRAGMENTANCHOR line above all colums.


    My question is, do I break anything else by making this change?

    thanks,
    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

    #2
    Hi there

    I would not think that you could break anything by moving the variable around. All you are simply doing, is moving the fragment anchor which, when search, will go to that part of the fragment. I can't see it being a problem, if anyone disagrees, then please feel free to comment to this thread.

    Kind Regards
    Nadeem Rasool
    SellerDeck Development

    Comment


      #3
      I wrote that. I'm not sure if moving that anchor is desirable. Where it is, is designed to take you to the particular item (it's within a table cell) regardless of whether the page is viewed on a normal or no-JavaScript browser.

      If you do move it, then it may be best to keep it within a table cell as the actual screen location of items between <table> and <tr>, <tr> and <td> is somewhat undefined.
      Norman - www.drillpine.biz
      Edinburgh, U K / Bitez, Turkey

      Comment


        #4
        OK Norman,

        Do you have a fix for only two columns out of three showing a fragment anchor line when using your code with the original configuration?
        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


          #5
          Sorry, no. I write these and give them away. I don't actually use them so have little experience of them in practice.

          I simply can't see how the effect your describing could happen. The original position surely places the anchor within a table cell just above each fragments image and text. I can't see how the fragment can get displayed (regardless of position on the page) without the NETQUOTEVAR:FRAGMENTANCHOR being expanded.

          However if moving it works then for you then go for it.
          Norman - www.drillpine.biz
          Edinburgh, U K / Bitez, Turkey

          Comment


            #6
            I will leave it as you wrote it for now.

            I must admit that reading the code it is hard to see why it does not print the anchor line. I take it the ++ means after increment and the == means exactly equal?, and the if condition is always an immediate if?

            Perhaps I have messed up and currentcol is not in scope..

            Learning every day - and I love it.
            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


              #7
              It's always hard to debug pages with document.write('something') generated code. When you view the page source all you'll see is the original JavaScript and not the generated HTML.

              You best friend become the alert() statement where you can use it to show what's happening when. e.g. alert('NETQUOTEVAR:FRAGMENTANCHOR'); will pop up an alert box containing the text in each anchor.
              Norman - www.drillpine.biz
              Edinburgh, U K / Bitez, Turkey

              Comment


                #8
                I fixed this by adding a full-width fragment above the three column layout. With the additional fragment in place the first column generated the anchor line.

                Just looks a little better when its consistent<g>, though quite why the standard headerguide does not cause the first anchor line to show, I will never know.
                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

                Working...
                X