This PR adds in the Latest News Module (mod_articles_news) an option exclude the current article to filter the current article from displaying in the module.
Summary of Changes
If you configure the Latest News Module to display Articles from Category "A",
and the Module is displayed on an Article page (that is also in Category "A"),
the Article is displayed on the page and in the Module.
This PR adds an option in the Latest News Module to exclude the current article.
The option is OFF by default (so the current behavior before installing the patch is default)
It also checks for com_content being active to prevent that other components that use an "id" might interfere with the Latest News Module output.
Testing Instructions
Create a Category "A"
Add 5 different articles with different titles
Create a menu item for Category blog and another for Single Article
Assign the "Latest News" Module to the two pages, configure display title and change the limit to 5.
If you are on an Article page, the com_content component article view will display the article, but it is also visible in the "Latest News" Module output.
In the parameters of "Latest News" Module, switch on "Exclude current Article" and check the page again.
Thank you all for testing!
This PR was for Joomla 3.x but won't be added in that series anymore.
I've redone this PR for Joomla 4: #24672
Closing this PR...
I have tested this item✅ successfully on 1da3533
I have tested this successfully on Joomla! 3.9.2.
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/23575.