Skip to main content

Templates

FLEXIcontent uses PHP/CSS templates to control the rendering of items and lists.

Two main view types​

  • Item view: the detail page of one item.
  • List views: category, multi-category, tags, favourites, authors, advanced search.

Each view can have its own template. You can also define templates specific to a content type or a menu item.

Required skills​

To create or adapt a template you need:

  • basic HTML and CSS knowledge;
  • the ability to read conditions and loops in PHP;
  • to look at the bundled templates to understand the available objects and variables.

The administrator interface also lets you place fields in the output by drag and drop, which covers many needs without writing code.

Customise without rewriting everything​

Before creating a template from scratch:

  1. Duplicate an existing template.
  2. Adjust the HTML and CSS classes.
  3. Move fields in the layout.
  4. Test on a real view with several items.
warning

After a major FLEXIcontent upgrade, check your custom templates. Some settings or classes may need adaptation.

Official resources​