Content

Custom fields, and when to skip the extension

Custom fields, and when to skip the extension

Many staff page, listing and product extensions are just custom fields with a template. Build the same in Joomla core in an afternoon and own it.

Custom fields have been in Joomla since 3.7 and are still the most underused thing in the CMS. They attach structured data to articles, contacts, users and more, without a single extra table.

What you get

Fields are grouped, assigned per category, and come in useful types: text, textarea, list, checkboxes, calendar, media, URL, integer, colour, and a repeatable subform for rows of related values.

The subform is the one that changes what is possible. A staff page with name, role, photo and phone per person is one repeatable field, not four articles and a workaround.

Where it usually goes wrong

People add the fields, see them dumped at the bottom of the article in a definition list, decide it looks bad, and go buy an extension. The output is a layout, and layouts can be overridden.

The field rendering lives in layouts/joomla/. Copy what you need into your template's html/layouts/ and it renders however you want. You can also place a single field anywhere in your own layout, rather than accepting the block at the bottom.

Set the field's Automatic Display option to Do not automatically display when you are rendering it yourself. Otherwise it appears twice and someone will file that as a bug.

When an extension is the right answer

Custom fields store data against an item. They do not give you filtering, faceted search, or a front-end submission form worth the name. The moment your requirement includes "and visitors need to filter by price and region", you want a real component. Trying to bend fields into that is how you end up with a site nobody can maintain.

The reason to prefer them anyway

Custom fields are core. They get updated with Joomla, they are documented, and they will still work in five years. An abandoned extension holding your content hostage is a specific kind of misery, and it is worth some layout work to avoid it.

Stuck on something else?

Doctor Joomla is a project of Cloudfaction, a Dutch agency building and maintaining Joomla sites since 1999. The articles are made with the help of AI, so tell us if something does not match your screen. Mail info@cloudfaction.nl if you want someone to look at yours.

Rather have someone look at it

Doctor Joomla is a Cloudfaction project.

A Dutch agency that has been building and running Joomla sites since 1999. If your site needs more than an article can fix, get in touch.