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

Custom templates to modify block layout


In Chapter 4 we had a first quick look at the structure of a block. We're going to take a deeper look at two elements of that structure:

  • view.php: We're going to refer to it as the default block template. It's the file responsible for the output of the block.

  • templates: This directory contains more (optional) block templates. Some blocks already come with several templates, and some only with the default block template.

What does this mean in more detail?

  • A core custom template can be found in /concrete/blocks/<block-name>/templates. Custom templates are optional though, you won't find a lot of templates by default.

  • A custom template could also be placed in /blocks/<block-name>/templates. What's the difference to the location mentioned above? You should avoid making any modification to a file in the concrete directory. This is why it's possible to override templates by using the same path without concrete at the beginning, which will make it...