Book Image

concrete5 Beginner's Guide

Book Image

concrete5 Beginner's Guide

Overview of this book

Table of Contents (19 chapters)
concrete5
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Time for action – handling multiple block versions


We're going to add an attribute to our table to manage the replacement of block versions. In our product list, we can see for this attribute to check if a block has been replaced.

  1. Add a new table column by adding the following modification to db.xml; please note, the code only shows a part of the actual file:

       <table name="btProductInformation">
       <field name="bID" type="I">
          <key />
          <unsigned />
       </field>
       <field name="title" type="C" size="255"></field>      
       <field name="description" type="X2"></field>
       <field name="fIDpicture" type="I"></field>
       <field name="categoryID" type="I"></field>
       <field name="replacesBlockID" type="I"></field>
       <index name="btProductInformation_IX1">
           <descr>Makes sure replacment lookups perform well</descr>
           <col>replacesBlockID</col>
           <unique...