Page 1 of 1

Having different Fragment and Product column counts.

Posted: Mon Jan 09, 2006 2:16 am
by norman
Starting a page with Fragments in a different number of columns than the Products.

In Actinic go to Advanced / Custom Properties and create a property FRAGCOLS

Go Design / Options / Site Defaults / Properties, click the "+" sign
and select FRAGCOLS. Set its value to 6 (for 6 columns, 4 for 4 , etc).

Edit Act_ProductBaody.html and loom for the block

Code: Select all

<script language=JavaScript>
<!-- (V11)
var currentcol = 0;
var colwidth = Math.floor(100 / CUSTOMVAR:NUMCOLS);
// -->
</script>
replace it with

Code: Select all

<script language=JavaScript>
<!-- (V11)
var currentcol = 0;
var colwidth = Math.floor(100 / CUSTOMVAR:NUMCOLS);
var fragcols = CUSTOMVAR:FRAGCOLS;
var fragcolwidth = Math.floor(100 / fragcols);
function newrow(){
 currentcol = fragcols;
}
// -->
</script>
Create alternative Fragment Templates that will be used when you want a different
number of fragments across than products.

Call this one (for Image and Title) DiffColsCatalogFragment_ImageAndTitle.html

Code: Select all

<!-- Different Column Count Catalog Page Fragment ImageAndTitle HTML begin -->

<script language=JavaScript>
<!-- (V11)
if ( currentcol++ == 0 ) document.write('<tr><td colspan=3><table border=0><tr>');
document.write('<td width="' + fragcolwidth + '%" valign=top>NNN');
// -->
</script>
<noscript><tr><td width="100%"></noscript>

  <!-- START each fragment lives in this table - alter below to rearrange items -->
  <table width="100%" cellspacing="5" cellpadding="1">
   <tr>
    <td width="100%" align="center">NETQUOTEVAR:FRAGMENTANCHORNETQUOTEVAR:BROCHURE_IMAGE</td>
   </tr>
   <tr>
    <td width="100%" align="center"><h3>NETQUOTEVAR:BROCHURE_TITLE</h3></td>
   </tr>
  </table>
  <!-- END each product lives in this table - alter above to rearrange items -->

 </td>
<script language=JavaScript>
<!--
if ( currentcol >= fragcols )
  {
  document.write('</tr></table></td></tr>');
  currentcol = 0;
  }
// -->
</script>
<noscript></tr></noscript>

<!-- Different Column Count Catalog Page Fragment ImageAndTitle HTML end -->
And this one (for Text and Title) DiffColsCatalogFragment_TextAndTitle.html


Code: Select all

<!-- Different Column Count Catalog Page Fragment TextAndTitle HTML begin -->

<script language=JavaScript>
<!-- (V11)
if ( currentcol++ == 0 ) document.write('<tr><td colspan=3><table border=0><tr>');
document.write('<td width="' + colwidth + '%" valign=top>TTT');
// -->
</script>
<noscript><tr><td width="100%"></noscript>

  <!-- START each fragment lives in this table - alter below to rearrange items -->
  <table width="100%" cellspacing="5" cellpadding="1">
   <tr>
    <td width="100%">
    NETQUOTEVAR:FRAGMENTANCHOR
    <h3>NETQUOTEVAR:BROCHURE_TITLE</h3>
    NETQUOTEVAR:BROCHURE_TEXT</td>
   </tr>
  </table>
  <!-- END each product lives in this table - alter above to rearrange items -->

 </td>
<script language=JavaScript>
<!--
if ( currentcol >= fragcols )
  {
  document.write('</tr></table></td></tr>');
  currentcol = 0;
  }
// -->
</script>
<noscript></tr></noscript>

<!-- Different Column Count Catalog Page Fragment TextAndTitle HTML end -->
Use these Templates for the fragments that you want in different column counts.

That's it.

NOTE

If you have a final row of Fragments that is incomplete and you want the products
to start on a new row, then paste the following into the Description of the final fragment

Code: Select all

!!<<script language=JavaScript>newrow()</script>>!!
You can still mix other Fragments in with Products - just use the MultiColumnCatalogFragment
templates for these.

Re: Having different Fragment and Product column counts.

Posted: Wed Mar 30, 2016 3:59 pm
by demalpas
Norman,

I want to achieve something like this but (I hope) simpler. I want to have the fragment text and image above for a paginated set of product pages appear only on page 1 of the paginated set of product pages. At present it appears on every page. See http://www.morethanmowers.co.uk/acatalo ... es-p1.html and go to page 2.

Can you help with this please?

If you haven't done this or similar , I would be happy to pay for it.

Many thanks

Mike

Re: Having different Fragment and Product column counts.

Posted: Wed Mar 30, 2016 8:46 pm
by norman
This is a 10 year old thread and is not applicable since Actinic V7.

Best email me with details of what you want.

Or ask on community.sellerdeck.com where you may get alternative suggestions.

Norman