Pro
Since v4.0, some visual elements are displayed through layouts, allowing template overrides. These layouts are created for:
- the views category index (
lnepcategoryindex.phpandlnepk2categoryindex.php), - the views tag index (
lneptagindex.phpandlnepk2tagindex.php), - the views search/clear fields (
lnepsearch.php), - the modals (
lnepmodal.php), - the views print icon (
lnepicons.php), - the views and module item's details (
lnep_detail_hits.php, ...), - the views and module item's details for Joomla 3.7+ custom fields (
lnep_detail_jfield_generic.php,lnep_detail_jfield_calendar.php, ...), - the views and module item's details for K2 extra fields (
lnep_detail_k2field_generic.php,lnep_detail_k2field_date.php, ...), - the heads of type video (
lnep_head_video_dailymotion.php, ...), - v4.12 the views author index (
lnepauthorindex.phpandlnepk2authorindex.php), - v5.1 the views custom field index (
lneplistfield.php), - v6.0 the views display number (
lnepdisplay.php), - v6.5 the title detail (
lnep_detail_title.php), - v6.5 the text detail (
lnep_detail_text.php), - v6.5 the list views columns sort arrows (
lnepcolumnsort.php), - v6.8 the views alias index (
lnepaliasindex.phpandlnepk2aliasindex.php), - v7.2 the multilingual associations detail (
lnep_detail_associations.php), - v7.2 the publishing state detail (
lnep_detail_publishingstate.php), - v7.2 the workflow stage detail (
lnep_detail_workflowstage.php), - v7.2 the views workflow stage index (
lnepstageindex.php), - v7.3 the media custom field detail (
lnep_detail_jfield_media.php).
You can find the layouts under components/com_latestnewsenhancedpro/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_latestnewsenhancedpro 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 modal and icons layouts.
lnepicons.phpshows the icon selection (print, edit)lnepmodal.phphas the code to show the modals
The module and the component views share the modals layout. Any override made will be used throughout.
Details
Holds all information details (defaults, custom fields and K2 extra fields).
lnep_detail_ago.phpoutputs date as X days ago/inlnep_detail_agohm.phpoutputs date as X days or X minutes... ago/inlnep_detail_agomhd.phpoutputs date as X days and X minutes... ago/inlnep_detail_associations.phpoutputs language associationslnep_detail_author.phpoutputs the authorlnep_detail_category.phpoutputs the categorylnep_detail_date.phpoutputs the flat-out datelnep_detail_hits.phpoutputs the number of hitslnep_detail_jcommentscount.phpoutputs the number of comments from jcommentslnep_detail_jfield_calendar.phpoutputs custom fields of calendar typelnep_detail_jfield_editor.phpoutputs custom fields of editor typelnep_detail_jfield_generic.phpoutputs custom fields that have no specific layoutlnep_detail_jfield_media.phpoutputs custom fields of media typelnep_detail_jfield_textarea.phpoutputs custom fields of textarea typelnep_detail_jfield_url.phpoutputs custom fields of url typelnep_detail_k2commentscount.phpoutputs K2 comments countlnep_detail_k2field_date.phpoutputs K2 date fieldlnep_detail_k2field_generic.phpoutputs K2 fields that have no specific layoutlnep_detail_k2field_link.phpoutputs K2 link fieldlnep_detail_k2field_multipleselect.phpoutputs K2 multiple select fieldlnep_detail_k2field_radio.phpoutputs K2 radio fieldlnep_detail_k2field_select.phpoutputs K2 select fieldlnep_detail_k2field_textarea.phpoutputs K2 textarea fieldlnep_detail_keywords.phpoutputs meta keywordslnep_detail_linksabc.phpoutputs links A, B and Clnep_detail_publishingstate.phpoutputs article publishing statelnep_detail_rating.phpoutputs the article ratinglnep_detail_readmore.phpoutputs a readmore linklnep_detail_share.phpoutputs share links (Facebook...)lnep_detail_tags.phpoutputs tagslnep_detail_title.phpoutputs the item title (as specified in the list views only)lnep_detail_time.phpoutputs the flat-out timelnep_detail_text.phpoutputs the item's text (as specified in the list views only)lnep_detail_workflowstage.phpoutputs the workflow stage the article is in
v4.11
The lnep_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_latestnewsenhancedpro/details/lnep_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 Tumblr share button.
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 lnep_detail_jfield_[field plugin element name].php, which will represent the field type. It is easier to just copy one of the other detail layouts, renamed and modified.
Heads
Holds all video types that represent the head of an item.
lnep_head_video_dailymotion.phpoutputs DailyMotion videoslnep_head_video_facebookvideo.phpoutputs Facebook videoslnep_head_video_html5video.phpoutputs HTML5 videoslnep_head_video_vimeo.phpoutputs Vimeo videoslnep_head_video_youtube.phpoutputs YouTube videos
Pagination
Contains all the pagination-related layouts (filters and search).
lnepaliasindex.phpoutputs the alias indexlnepauthorindex.phpoutputs the author indexlnepcategoryindex.phpoutputs the category indexlnepcolumnsort.phpoutputs arrows for table headers (list view only)lnepdisplay.phpoutputs the display number select boxlnepk2aliasindex.phpoutputs the alias index for K2lnepk2authorindex.phpoutputs the author index for K2lnepk2categoryindex.phpoutputs the category index for K2lnepk2tagindex.phpoutputs the tag index for K2lneplistfield.phpoutputs the custom field index of list, checkboxes or radio typelnepsearch.phpoutputs the search fieldlnepstageindex.phpoutputs the workflow stage indexlneptagindex.phpoutputs the tag index
v5.1 The new custom field index layout (lneplistfield.php) allows you to use any custom field of list type as index for the articles. 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_LATESTNEWSENHANCEDPRO_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_latestnewsenhancedpro 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 index and information details. 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 lnepcategoryindex.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 lnepcategoryindex.xyz.php.

