Are you enjoying the extensions? Did you like the support? Help others decide.

Leave a review

Layout overrides

Article Details


Since v5.0, all article details are shown through layouts, allowing template overrides.

You can find the original layouts under components/com_articledetailsprofiles/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.

Note that the overrides have precedence over the component's layouts.

The layouts are available from your template's Create Overrides tab, under the layouts section.

The layouts ready for override
The layouts ready for override

Once clicked, all the layouts are copied over to the template's /html/layouts folder (Editor tab).

The created layouts overrides
The created layouts overrides

Available layouts

  • adp_detail_associations.php shows the article's language associations
  • adp_detail_author.php outputs the author
  • adp_detail_authorcommunitybuilder.php outputs the Community Builder author
  • adp_detail_category.php outputs the category
  • adp_detail_combocategories.php outputs the category and its parent(s)
  • adp_detail_date.php outputs the flat-out date
  • adp_detail_email.php shows an email icon to share through email
  • adp_detail_hits.php outputs the number of hits
  • adp_detail_jcommentscount.php outputs the number of comments from jcomments
  • adp_detail_jfield_calendar.php outputs custom fields of calendar type
  • adp_detail_jfield_editor.php outputs custom fields of editor type
  • adp_detail_jfield_generic.php outputs custom fields that have no specific layout 
  • adp_detail_jfield_textarea.php outputs custom fields of textarea type
  • adp_detail_jfield_url.php outputs custom fields of url type
  • adp_detail_keywords.php outputs meta keywords
  • adp_detail_linkabc.php outputs link A, B and C, individually
  • adp_detail_linksabc.php outputs links A, B and C
  • adp_detail_parentcategory.php outputs the parent category
  • adp_detail_print.php shows a print icon
  • adp_detail_rating.php outputs the article rating
  • adp_detail_share.php outputs share links (Facebook...)
  • adp_detail_tags.php outputs tags
  • adp_detail_time.php outputs the flat-out time

The file names follow the convention: adp_detail_[information type].php

In Joomla 3.7+, the custom fields use the generic layout (adp_detail_jfield_generic.php), unless a specific layout is present.

The adp_detail_share layout now calls sub-layouts for all share buttons.
When creating a new share button, you need to add a new sub-layout to the /html/layouts/com_articledetailsprofiles /details/adp_detail_share folder (you may need to create those folders) of your template. To know what the sub-layout's code must be, just copy one of the extension's available sub-layouts.

Tutorial Learn how you can add a custom social network share button

Tip When clicking on the Details folder, all layouts are copied over to the [current_template]/html/layouts/com_articledetailsprofiles 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 plugin syntax or module instances. 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 adp_detail_jfield_generic.php but also have a module instance use a slightly different output. Just add the layout suffix (for example 'xyz') to the module instance and that instance will give priority to the override