This is the documentation for concrete5 version 5.6 and earlier. View Current Documentation

There are a number of spots that a block's presentation template can be found in Concrete5, and if you know about them they'll make your life infinitely easier.

Is your block using a custom template?

To see if your block is using a custom block template, put the page you're working on in edit mode, roll over the block in question, and click. Then, select "Change Template" from the menu. A Concrete5 dialog will open. If your block is using a custom template it will be displayed here.

Custom templates are located within the "templates/" directory inside the particular block type's directory. So, say you're working with Autonav block and your block is using the "Header Menu" custom template. Your block's template is either here:


or here:


The second listing will be interpreted before the first. The name of the template is automatically determined based on the filename. In this case, "header_menu.php" becomes "Header Menu" automatically.

These custom templates are found by the system automatically, so if you need to create a new custom template, called "Secondary Nav List" for example, you would copy concrete/blocks/autonav/templates/header_menu.php to blocks/autonav/templates/secondary_nav_list.php and make the changes there. Then when editing the site the custom template selector should pick up both the custom templates in concrete/blocks/autonav/templates and blocks/autonav/templates. Note: custom template filenames should not exceed 32 characters in length.

If your block doesn't use a custom template...

then it's even easier to find. If you open the custom template chooser and find no custom templates, or custom templates but your particular block is currently set to "(None Selected)" your block is pulling from either






Don't edit the templates within the concrete/ directory!

In the example above, the latter two items are templates in your root web directory. Whenever possible, if you need to change the template of block's that ship with Concrete, you should do so by copying their templates from concrete/ into your own root blocks/ directory and making changes there. That way, when you upgrade Concrete you can replace your entire concrete/ directory without worrying about merging changes you've made into the new directory.

Loading Conversation