Announcement

Collapse
No announcement yet.

Top And Bottom Products

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

    Top And Bottom Products

    Can anyone tell me how Actinic generates a different layout for the first product in a list (ie does not put a <HR> tag above).

    I am trying to put my product list into a kind of spread sheet format with headings above each column.

    I have tried putting these headings in Act_ProductBody.html but they also end up showing on the section and sub-section pages which is not required.

    I have also tried putting them into Act_ProductLineTable.html but this just seems to generate a new set of headings for each product.

    Can anyone suggest how I can work around this?

    #2
    Three ways spring to mind.

    1) Use a different template for the first product that contains the table setup stuff. You'll have to remember to adjust this if you add / remove things.

    2) Same as above but with a dummy product. You won't have to move this one - just always leave at the top of each section. You can comment out nearly everything in the template except the custom heading code.

    .3) JavaScript can automate this if you want a single fit and forget template..

    In your Product template where you want your top of page header try something like:

    Code:
    <script language=JavaScript>
     if ( ! subsequent ) 
       {
       document.write('First product HTML');
       }
     else
       {
       document.write('Subsequent product HTML');
       }
    var subsequent = true;
    </script>
    Norman
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      Thanks Norman

      That little JavaScript did the job nicely

      Comment

      Working...
      X