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
Thanks
Jenny
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 + '%">&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 + '%">&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.
Comment