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 + '%">&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.
## 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!!!!!!!!!!!
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 + '%">&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.
## 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!!!!!!!!!!!
Comment