Profiles
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.
Once clicked, all the layouts are copied over to the template's /html/layouts
folder (Editor tab).
Available layouts
adp_detail_associations.php
shows the article's language associationsadp_detail_author.php
outputs the authoradp_detail_authorcommunitybuilder.php
outputs the Community Builder authoradp_detail_category.php
outputs the categoryadp_detail_combocategories.php
outputs the category and its parent(s)adp_detail_date.php
outputs the flat-out dateadp_detail_email.php
shows an email icon to share through emailadp_detail_hits.php
outputs the number of hitsadp_detail_jcommentscount.php
outputs the number of comments from jcommentsadp_detail_jfield_calendar.php
outputs custom fields of calendar typeadp_detail_jfield_editor.php
outputs custom fields of editor typeadp_detail_jfield_generic.php
outputs custom fields that have no specific layoutadp_detail_jfield_textarea.php
outputs custom fields of textarea typeadp_detail_jfield_url.php
outputs custom fields of url typeadp_detail_keywords.php
outputs meta keywordsadp_detail_linkabc.php
outputs link A, B and C, individuallyadp_detail_linksabc.php
outputs links A, B and Cadp_detail_parentcategory.php
outputs the parent categoryadp_detail_print.php
shows a print iconadp_detail_rating.php
outputs the article ratingadp_detail_share.php
outputs share links (Facebook...)adp_detail_tags.php
outputs tagsadp_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.
v5.2
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 adp_detail_jfield_generic.xyz.php
.