Announcement

Collapse
No announcement yet.

Brochure fragments side by side

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

    Brochure fragments side by side

    Can you have it so, if you had say 4 brochure fagments that 2 of them would be side by side and the next 2 below side by side..
    Thanks
    Jenny
    Hanson Web Design
    www.hansonwebdesign.co.uk
    jenny@hansonwebdesign.co.uk
    Actinic hosting, Actinic Software, template design and re-design

    #2
    It can be done but needs a bit of patching.

    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.

    Luckily I'd already done this for multi-column products so most of the code was lying around.

    Norman
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      Norman,
      much appreciated. I will be busy this afternoon.
      Jenny
      Hanson Web Design
      www.hansonwebdesign.co.uk
      jenny@hansonwebdesign.co.uk
      Actinic hosting, Actinic Software, template design and re-design

      Comment


        #4
        Post the URL when you get it working so I can take a peek.

        Norman
        Norman - www.drillpine.biz
        Edinburgh, U K / Bitez, Turkey

        Comment


          #5
          Jenny,

          I just amended my post above (the forum ate some &amp;nbsp; tags). Best go copy it again.

          Norman

          Note to Moderator. The forum replaces text like &amp;nbsp; even when within [ c o d e ] tags. I have to write them like & a m p ; n b s p ;
          (without the spaces)
          Norman - www.drillpine.biz
          Edinburgh, U K / Bitez, Turkey

          Comment


            #6
            I have got it working with 2 across, however it blows my whole theme out.. I have the custwidth set to 520.
            J
            Hanson Web Design
            www.hansonwebdesign.co.uk
            jenny@hansonwebdesign.co.uk
            Actinic hosting, Actinic Software, template design and re-design

            Comment


              #7
              it's working...
              Thanks so much
              Jenny
              Hanson Web Design
              www.hansonwebdesign.co.uk
              jenny@hansonwebdesign.co.uk
              Actinic hosting, Actinic Software, template design and re-design

              Comment


                #8
                and people always want more..

                Is it possible to have 1, then 2 by 2 and then 1?
                Jenny
                Hanson Web Design
                www.hansonwebdesign.co.uk
                jenny@hansonwebdesign.co.uk
                Actinic hosting, Actinic Software, template design and re-design

                Comment


                  #9
                  Is it possible to have 1, then 2 by 2 and then 1?
                  It's already in there. See the final note:-

                  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 (anywhere the fragment 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.

                  The 1st Fragment is slightly tricky. You would have to set the Property BROCHURECOLS in Actinic to 1 to get the first fragment full width. The in that fragment add

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

                  Norman
                  Norman - www.drillpine.biz
                  Edinburgh, U K / Bitez, Turkey

                  Comment


                    #10
                    done..brilliant.
                    Jenny
                    Hanson Web Design
                    www.hansonwebdesign.co.uk
                    jenny@hansonwebdesign.co.uk
                    Actinic hosting, Actinic Software, template design and re-design

                    Comment


                      #11
                      Hi,

                      Please help... fairly new to Actinic.. so please be gentle.

                      In regard sto the above, I have added the script to the NETQUOTEVAR:BROCHUREBODY as indicated.

                      However, I cant seem to locate which files are the EVERY brochure template files... me being thick i guess.

                      There are 11 html files beginning with Act_Brochure..but none seem to have the 2 breaks in them.... which files should i be looking for??? Please can you assist.

                      Thank you

                      Comment


                        #12
                        Each brochure fragment has a template that defines how it looks. You need to edit everyone of these with the new code..
                        eg Act_ImageAndTitle.html
                        Go through and look at the Layouts of the fragments
                        jenny
                        Hanson Web Design
                        www.hansonwebdesign.co.uk
                        jenny@hansonwebdesign.co.uk
                        Actinic hosting, Actinic Software, template design and re-design

                        Comment


                          #13
                          Excellent.

                          Thanks Jenny.

                          Comment


                            #14
                            Good luck
                            Jenny
                            Hanson Web Design
                            www.hansonwebdesign.co.uk
                            jenny@hansonwebdesign.co.uk
                            Actinic hosting, Actinic Software, template design and re-design

                            Comment


                              #15
                              Hi again Jenny,

                              I seem to have got that working now for the fragments... but i'd somehow like to have the main products index page set into columns.... ie. 4 cols, 4 rows... ie 16 image links...

                              Any ideas??

                              Correct me if im wrong but what i have done so far wont do the products...will it?

                              Is it possible to create a specific layout template??

                              Comment

                              Working...
                              X