Welcome,
Guest
.
Please
login
or
register
.
Did you miss your
activation email
?
News:
IOS Hotels
and
IOS Rentals
online booking systems for Elxis CMS.
Home
Help
Login
Register
Elxis CMS Forum
»
Support
»
Elxis 4.x/5.x DEV
»
Exclude current article from ARTICLES module?
« previous
next »
Print
Pages: [
1
]
Author
Topic: Exclude current article from ARTICLES module? (Read 3835 times)
seadhna
Hero Member
Posts: 507
Exclude current article from ARTICLES module?
«
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
Logged
webgift
Elxis Team
Hero Member
Posts: 4193
Re: Exclude current article from ARTICLES module?
«
Reply #1 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
; }
Logged
Elxis Team •
Custom web design [EN]
-
[EL]
•
.GR Registrar
seadhna
Hero Member
Posts: 507
Re: Exclude current article from ARTICLES module?
«
Reply #2 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 :-)
Logged
webgift
Elxis Team
Hero Member
Posts: 4193
Re: Exclude current article from ARTICLES module?
«
Reply #3 on:
August 21, 2020, 16:38:29 »
You're welcome..@seadhna!
Logged
Elxis Team •
Custom web design [EN]
-
[EL]
•
.GR Registrar
Print
Pages: [
1
]
« previous
next »
Elxis CMS Forum
»
Support
»
Elxis 4.x/5.x DEV
»
Exclude current article from ARTICLES module?