Some elements are displayed through layouts, allowing overrides. These layouts are created for:
- the directory view category index (
wlpcategoryindex.php
), - the directory view tag index (
wlptagindex.php
), - the directory view print icons (
wlpicons.php
), - v2.5.2 the directory view search/clear (
wlpsearch.php
), - v2.6 the modal window (
wlpmodal.php
), - v4.3 the directory view display number (
wlpdisplay.php
), - v4.5 the directory view custom field index (
wlplistfield.php
).
You can find those layouts under components/com_weblinklogospro/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_weblinklogospro
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 and modal layouts.
wlpicons.php
shows the icon selection (print, edit)wlpmodal.php
has the code to show the modals
The module and the component views share the layouts. Any override made will be used throughout.
Pagination
Contains all the pagination-related layouts (search, category and tag index).
wlpcategoryindex.php
outputs the category indexwlpdisplay.php
outputs the select box that contains the number of items to show per pagewlplistfield.php
outputs any custom fields index of list, checkboxes or radio typewlpsearch.php
outputs the search fieldwlptagindex.php
outputs the tag index
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_weblinklogospro
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 wlpcategoryindex.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 wlpcategoryindex.xyz.php
.