? ? ? Pending

User tests: Successful: Unsuccessful:

avatar pe7er
pe7er
21 Apr 2019

This PR adds in the Module Articles - Newsflash (mod_articles_news) an option exclude the current article to filter the current article from displaying in the newsflash module..
It's PR #23575 "Exclude current article" re-done for Joomla 4.

Summary of Changes

The Module Articles - Newsflash can display the same article as the article currently displayed on the page.

  • 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 Module Articles - Newsflash, choose Category :Blog", assign the module to position "sidebar-right" and assign the module to display "On all pages".
  • Go to a page that displays an article, for example index.php/blog/3-welcome-to-your-blog
  • Refresh the page a couple of times to see that the Newsflash Module might display the same article text.

mod_articles_newsflash-before-frontend

Expected result

Before installing this PR, the following options are available:

mod_articles_newsflash-before-backend

After installing this PR, there's a new option available: "Exclude current Article" that is set to "No" by default.

mod_articles_newsflash-after-no

After configuring the "Exclude current Article" to "Yes", the module should not display the same article anymore.

mod_articles_newsflash-after-yes

avatar pe7er pe7er - open - 21 Apr 2019
avatar pe7er pe7er - change - 21 Apr 2019
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 21 Apr 2019
Category Language & Strings Modules Front End
avatar infograf768 infograf768 - change - 22 Apr 2019
Labels Added: ? ?
avatar pe7er
pe7er - comment - 23 Apr 2019

Thanks for your improvements @brianteeman and @HLeithner
I've added them to this PR, and updated it also with the 4.0-dev branch

avatar infograf768
infograf768 - comment - 24 Apr 2019

In certain conditions (specific category with only one item set to not display), the module will display its title without any articles.

EDIT: I guess to take care of in another patch.

avatar pe7er
pe7er - comment - 24 Apr 2019

Thanks for your improvements @SharkyKZ

@infograf768 Thanks, you are right. I might write another patch for that...

avatar sanderpotjer
sanderpotjer - comment - 4 May 2019

I have tested this item successfully on afd2862


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/24672.

avatar sanderpotjer sanderpotjer - test_item - 4 May 2019 - Tested successfully
avatar tonypartridge
tonypartridge - comment - 13 Jul 2019

I have tested this item successfully on afd2862

Great addition, thanks pe7er!


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/24672.

avatar tonypartridge tonypartridge - test_item - 13 Jul 2019 - Tested successfully
avatar franz-wohlkoenig franz-wohlkoenig - change - 13 Jul 2019
Status Pending Ready to Commit
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 13 Jul 2019

Status "Ready To Commit".

avatar wilsonge wilsonge - change - 15 Jul 2019
Labels Added: ?
avatar wilsonge wilsonge - change - 15 Jul 2019
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2019-07-15 08:05:10
Closed_By wilsonge
avatar wilsonge wilsonge - close - 15 Jul 2019
avatar wilsonge wilsonge - merge - 15 Jul 2019
avatar wilsonge
wilsonge - comment - 15 Jul 2019

Nice touch! Thanks!

Add a Comment

Login with GitHub to post a comment