Elxis CMS Forum

Support => Elxis 4.x/5.x DEV => Topic started by: seadhna on August 11, 2020, 18:13:55

Title: Exclude current article from ARTICLES module?
Post by: seadhna on August 11, 2020, 18:13:55
Is it possible to exclude the article you are currently viewing from a listing of articles produced by the ARTICLES module? e.g. show three most recent items from a category EXCEPT the current/active one.
I found this discussion on the Joomla website: https://forum.joomla.org/viewtopic.php?t=926014
Title: Re: Exclude current article from ARTICLES module?
Post by: webgift on August 13, 2020, 19:55:59
Hello,
you could edit the file: /modules/mod_articles/mod_articles.php

Add to line 486 the following line:

if (defined('ELXIS_ARTID')) { $sql .= " AND a.id <> ".ELXIS_ARTID; }
Title: Re: Exclude current article from ARTICLES module?
Post by: seadhna on August 14, 2020, 15:11:55
Amazing - thank you!
The similar line in module 'latestarticles' seemed to be line 249 so I added the new line there too and it works :-)
Title: Re: Exclude current article from ARTICLES module?
Post by: webgift on August 21, 2020, 16:38:29

You're welcome..@seadhna!