Announcement

Collapse
No announcement yet.

Brochure Multi Columns

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

    Brochure Multi Columns

    Hi,

    I am trying to get multiple columns on my front page, I know that this is done by multiple columns for the Fragments so they align next to each other instead of underneath.

    I got some code off here from Norman Rouxel which has effect on the layout but not what im looking for - There seem to be bits missing in my Templates that Norman asks to replace making me think im not doing it right;

    Here is his code;
    Auto Brochure Multi Columns.

    Created 02-03-04 Author Norman Rouxel

    This readme will allow you to lay Brochure Fragments out in any number of columns.
    The number of columns can be altered by setting a Custom Property.


    INSTALLATION


    Edit Act_BrochurePrimary.html - replace the line:-


    NETQUOTEVAR:BROCHUREBODY<br>

    with


    <script language=JavaScript>
    <!--
    var currentcol = 0;
    var brochurecols = CUSTOMVAR:BROCHURECOLS;
    var newcols = brochurecols;
    var colwidth = Math.floor(100 / brochurecols);
    document.write('<table width=100%>');
    function startfrag(){
    if ( currentcol++ == 0 ) document.write('<tr>');
    document.write('<td width="' + colwidth + '%" valign=top>');
    }
    function endfrag(){
    if ( brochurecols == newcols ) // normal end of fragment
    {
    document.write('</td>');
    if ( currentcol >= brochurecols )
    {
    document.write('</tr>');
    currentcol = 0;
    }
    }
    else // we want start a new column count
    {
    document.write('</td>');
    while ( currentcol++ < brochurecols ) document.write('<td width="' + colwidth + '%">&amp;nbsp;</td>');
    document.write('</tr></table><table width=100%>'); // end previous table and start new
    currentcol = 0;
    brochurecols = newcols;
    colwidth = Math.floor(100 / brochurecols);
    }
    }
    function newcolcount(newcount){ // reset the column count
    newcols = newcount;
    }
    // -->
    </script>
    NETQUOTEVAR:BROCHUREBODY<br>
    <script language=JavaScript>
    <!--
    if ( currentcol != 0 )
    {
    while ( currentcol++ < brochurecols ) document.write('<td width="' + colwidth + '%">&amp;nbsp;</td>');
    document.write('</tr>');
    currentcol = 0;
    }
    document.write('</table>');
    // -->
    </script>



    In EVERY Brochure Fragment template:-

    replace

    <br>
    <br>


    with


    <script language=JavaScript>
    <!--
    startfrag();
    // -->
    </script>
    <noscript><br><br></noscript>


    add the following above the final line ( usually <!-- **** HTML end --> )


    <script language=JavaScript>
    <!--
    endfrag();
    // -->
    </script>


    Make sure you do the above to ALL brochure fragment templates. There are usually 8!

    Thats all patching.


    CONFIGURATION


    In Actinic go to Advanced / Custom Properties, click the "+" and create a Customvar BROCHURECOLS.

    Go to Design / Options / Site Defaults / Custom Properties, click the "+" and select BROCHURECOLS.
    Set it's value to 2 (or whatever number of columns you want).
    (if using Business uncheck Searchable and check Use as Customvar)


    That's that.


    NOTES

    You can change the number of columns on-the-fly.
    Unfortunately as Actinic don't allow Custom Properties to be set for Brochure fragments (tut-tut)
    you have to fudge it with a little javaScript in the fragment text.

    In the fragment BEFORE you want to change the column count add the text

    !!<<script language=JavaScript>newcols=3</script>>!!

    changing the 3 to suit - and the new column count will start at the next fragment.
    You can, of course, use 1 to get a single column layout.


    ## In the Act_BrochurePrimary.html, it says to replace the "NETQUOTEVAR:BROCHUREBODY<br>" in mine there actually is no <br> after the Brochure Body.

    Then when it says to replace code in each of the 8 templates (Act_textonly.html) etc it asks to replace <br><br> there are no double line breaks in any of the templates here is how they look;

    <!-- TextOnly HTML begin -->
    NETQUOTEVAR:FRAGMENTANCHOR

    <noscript><br><br></noscript>
    <tr>
    <td colspan="3" valign="top">
    <table border="0" width="100%" cellspacing="5" cellpadding="1">
    <tr>
    <td width="100%">NETQUOTEVAR:BROCHURE_TEXT </td>
    </tr>
    </table>
    </td>
    </tr>

    <!-- TextOnly HTML end -->


    Can Anyone help me Please!!!!!!!!!!!
    "What Does Not Kill Us Only Makes Us Stronger"

    #2
    That code is for V6 (written 2 years ago) and will fail in V7 as V7 now uses tables for brochure fragments. V6 just laid them out using <BR><BR> separators.
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      Hi,
      Thanks for the reply and a big "DOH!!!!" for me.

      Is there any chance you can help me out im after that effect but with V7?

      Many Many Thanks
      Chris
      "What Does Not Kill Us Only Makes Us Stronger"

      Comment


        #4
        Only if you hire me to do it - there's a lot of work involved.
        Norman - www.drillpine.biz
        Edinburgh, U K / Bitez, Turkey

        Comment


          #5
          I also recently found this out and was most perplexed as I am sure I acheived multiple column brochure pages using Normans script under v7. It may have worked using a different theme.
          I now just create my desired layouts in dreamweaver and then attach them to fragments on the brocure pages.
          It's a bit of a fiddle but I find I can get a better result using dreamweaver.
          Steve D
          Boomedia Ltd
          ______________________________________________________________
          www.jean-patrique.co.uk
          www.smartbeautyshop.com
          www.bunnybusiness.net
          www.ukpets247.co.uk

          Comment


            #6
            I have this working fine for fragments in V7, simply based on your multi-column product layout.
            BTW Norman - I just donated a little something in Paypal for your efforts with this.

            Comment


              #7
              Yes. I recently updated the Multi-Column Product patch to incorporate Brochure Fragments in columns. It should be possible (as you found, Duncan) to move some code from Act_ProductBody into Act_BrochurePrimary.html.
              Norman - www.drillpine.biz
              Edinburgh, U K / Bitez, Turkey

              Comment


                #8
                fragment files

                hi, i have edited the brochure_primary template, what are the fragment files called in my site1 folder

                rgds

                darren

                Comment


                  #9
                  Originally posted by dactinic
                  hi, i have edited the brochure_primary template, what are the fragment files called in my site1 folder
                  Act_TextandTitle
                  Act_TextOnly

                  Comment


                    #10
                    simple route to multi column brochure pages???

                    Hi

                    I have been struggling with this too, and have tried to make Norman's patch work for brochure, but my Perl just ain't up to it. I also wanted to mix and match a 3 col layout with a 1col sort of header layout. I also have to make it simple to hand over to a site editor with only very basic html - so the custom html fragments would have resulted in too many "support" phone calls ;-)

                    So I came up with this - it seems too simple, but I think it works. Comments please!

                    Make three new brochure templates:

                    -----------------------
                    Act_Frag_col1.html:
                    ------------------------
                    <!-- TextAndTitle HTML begin -->

                    <tr>
                    <td colspan="1" valign="top" width="33%">

                    NETQUOTEVAR:FRAGMENTANCHOR


                    <table border="0" width="100%" cellspacing="0" cellpadding="5">
                    <tr>
                    <td width="100%">


                    <H3>NETQUOTEVAR:BROCHURE_TITLE</h3>
                    <span class="actxxsmall"> NETQUOTEVAR:BROCHURE_TEXT</span></td>
                    </tr>
                    </table>


                    </td>


                    <!-- TextAndTitle HTML end -->

                    -----------------------------
                    Act_Frag_col2.html:
                    ------------------------------


                    <!-- TextAndTitle HTML begin -->


                    <td colspan="1" valign="top" width="33%">

                    NETQUOTEVAR:FRAGMENTANCHOR

                    <table border="0" width="100%" cellspacing="0" cellpadding="5">
                    <tr>
                    <td width="100%">


                    <H3>NETQUOTEVAR:BROCHURE_TITLE</h3>
                    <span class="actxxsmall"> NETQUOTEVAR:BROCHURE_TEXT</span></td>
                    </tr>
                    </table>


                    </td>


                    <!-- TextAndTitle HTML end -->




                    -------------------------------------------
                    Act_Frag_col3.html:
                    ----------------------------------


                    <!-- TextAndTitle HTML begin -->


                    <td colspan="1" valign="top" width="33%">

                    NETQUOTEVAR:FRAGMENTANCHOR


                    <table border="0" width="100%" cellspacing="0" cellpadding="5">
                    <tr>
                    <td width="100%">


                    <H3>NETQUOTEVAR:BROCHURE_TITLE</h3>
                    <span class="actxxsmall"> NETQUOTEVAR:BROCHURE_TEXT</span></td>
                    </tr>
                    </table>


                    </td>
                    </tr>


                    <!-- TextAndTitle HTML end -->
                    ------------------------

                    Then, so long as they are used

                    Act_Frag_col1
                    Act_Frag_col2
                    Act_Frag_col3

                    in sequence, you get 3 evenly spaced columns and you can use the basic text and title (or whatever) template at the top or bottom of this sequence to take up the whole width of the page (it is set as td colspan="3"). You could also set up a set of 2:1 col templates as well, if you need to, by declaring Act_Frag_col1and2 as <td colspan="2" width="66%"> and starting with an unclosed <tr>. You can then use Act_Frag_col3 as is to close the <tr>.

                    Comment


                      #11
                      oops

                      Just in case anyone looked at my earlier post and is having trouble - there was a rogue <div id col 1> left from earlier experiments - I have now taken it out. Sorry.

                      Comment

                      Working...
                      X