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

Product list


Wouldn't it be handy if we could create a list of all product information blocks in our website? Creating a list of products or news? Just like we can with the page list block which comes with the core? Sure we can, but we have to create another block.

Handling multiple block versions

However, before we can start building this block, we have to make a few more modifications to our product information block. Remember the explanation about bID at the beginning of this chapter—every time a block content is updated, a new data record is created. This means that after a few updates, we've got more table records than actual blocks we'd like to show in our list.

There are several options to get around this problem:

  • We could dig into the database model of concrete5 and see where it stores the information about page and block versions. This would certainly work, but as we wouldn't be using an official API, it's possible that our code would be broken in a future version of concrete5. Bad...