Since v2.4, some visual elements are displayed through layouts, allowing template overrides. These layouts are created for:
- the trombinoscope view search and clear fields (
tcpsearch.php), - the trombinoscope view alphabet index (
tcpalphabet.php), - the trombinoscope view category index (
tcpcategoryindex.php), - the trombinoscope view tag index (
tcptagindex.php), - the trombinoscope view sort filter (
tcpsort.php), - the trombinoscope list view column sort (
tcpcolumnsort.php), - individual tags (
tcptag.php), - the contact/trombinoscope views print/edit/vcard/download icons (
tcpicons.php- previously calledteicons.php), - the modals (
tcpmodal.php), - v3.0 the contact information details,
- v4.5 the trombinoscope view custom field index (
tcplistfield.php), - v4.6 the trombinoscope view display number (
tcpdisplay.php).
You can find the layouts under components/com_trombinoscopeextended/layouts.
As best practice, it is recommended to create overrides of those files rather than update them. That way, the next component update won't dismiss the changes you have made.
BEFORE creating layout overrides
Overrides are NOT updated when you perform an extension update. As such, they can soon become out of sync with the extension. You are not getting new features, bug fixes, security updates... Therefore, every time you update an extension you should make sure you check those overrides and keep them up to date. So, before you create an override, make sure:
- the changes you need cannot just be accommodated with CSS
- the Bootstrap compatibility of the extension is properly set (in the advanced tab, set the Bootstrap compatibility parameter to match your template's)
Creating layout overrides
Go to the layouts
section of your template's Create overrides
tab, select the com_trombinoscopeextended extension and then click on the desired layout folder (find detailed explanations about the content of those folders below).
Go back to the Editor tab. You will find the layout overrides under /html/layouts.
Content
Holds the icons, modal and tag layouts.
tcpicons.phpshows the icon selection (print, edit, vcard, download as csv)tcpmodal.phphas the code to show the modalstcptag.phprepresents the tags
The module and the component views share the tag and modals layouts. Any override made will be used throughout.
Details
Contains all layouts that create the contact details' outputs.
tcp_detail_address.phpoutputs the addresstcp_detail_empty.phpoutputs an empty fieldtcp_detail_editor.phpfor all data that include html tagstcp_detail_generic.phpfor all data that has no specific layouttcp_detail_link.phpfor all generic linkstcp_detail_mailto.phpfor mailto linkstcp_detail_name.phpoutputs the nametcp_detail_phone.phpoutputs all phone numberstcp_detail_social.phpoutputs all social media linkstcp_icondetail_link.phpfor all generic links shown as icon onlytcp_icondetail_mailto.phpfor mailto links shown as icon onlytcp_icondetail_phone.phpfor phone numbers shown as icon onlytcp_icondetail_social.phpfor social media links shown as icon only
Third party custom fields
You can specify which third party custom fields you want to make available in the extension as detailed information. Go to the Shared options tab of the global configuration of the extension.
The fields will not show in the extension's outputs unless you add specific layout overrides for them. In the /details folder, add the layout tcp_detail_jfield_[field plugin element name].php, which will represent the field type. If the field should also be used as link field (where information is represented as a clickable icon), add the layout tcp_icondetail_jfield_[field plugin element name].php. It is easier to just copy one of the other detail layouts, renamed and modified.
Tutorial Learn how you can add a third-party telephone field.
Pagination
Contains all the pagination-related layouts (sort, alphabet, category and tag index).
tcpalphabet.phpoutputs the alphabetical indextcpcategoryindex.phpoutputs the category indextcpcolumnsort.phpdeals with arrows for column sort (list view only)tcpdisplay.phpoutputs the display number select boxtcplistfield.phpoutputs the custom field indextcpsearch.phpoutputs the search fieldtcpsort.phpoutputs the sort filtertcptagindex.phpoutputs the tag index
v4.5 The new custom field index layout (tcplistfield.php) allows you to use any custom field of list type as index for the contacts. In the event you do not use a label, an invisible label is still required for accessibility purposes. The label is present in the layout but requires that you translate it by creating a language override for the key COM_TROMBINOSCOPEEXTENDED_FILTERFIELD_[field name]. Create a key for every custom field you are using as index filter.
AFTER creating layout overrides
Modify the files at your will. They will have precedence over the extension's files. Therefore, if you want to go back to the original outputs, you should delete the overrides that you have created.
Tip When clicking on a folder, all layouts are copied over to the [current_template]/html/layouts/com_trombinoscopeextended template folder. This happens even if you just want to only change one layout. Only keep the layouts overrides that need modifications. Delete all other layouts. This will help you down the road for maintenance (you will know that the files present have been modified for sure).
The layout suffix
You can use different overrides of the same layout for the directory view. Just set the advanced parameter Layout suffix. By doing so, you are giving priority to the layouts that will contain that suffix in the name of the override.
For instance, you can override tcpcategoryindex.php but also have another menu item using a slightly different output. Just add the layout suffix (for example 'xyz') in the menu item's advanced parameters to give priority to the override tcpcategoryindex.xyz.php.

