About matching titles query

For Joomla! 5.x Coding related discussions, you could also use: http://groups.google.com/group/joomla-dev-general

Moderators: ooffick, General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Post Reply
abomareya
Joomla! Intern
Joomla! Intern
Posts: 73
Joined: Mon Sep 19, 2022 12:56 pm
Location: Egypt
Contact:

About matching titles query

Post by abomareya » Tue Apr 09, 2024 8:00 am

What is the query used to find matching titles of articles published in Joomla ?

Also ,
Can it be developed to determine the degree of correspondence between the articles themselves and not just the titles?
Greetings and Appreciation
www.qelada.org

MarkRS
Joomla! Explorer
Joomla! Explorer
Posts: 345
Joined: Thu Oct 29, 2009 8:28 am
Location: UK

Re: About matching titles query

Post by MarkRS » Tue Apr 09, 2024 9:47 am

Which titles? Where? When?

If you mean from the search bar in the list of articles in the administrator panel, it's in the the GetListQuery of the ArticlesModel in the com_content component.

Yes, anything can be developed to do a(ny) thing, but will it? Probably not in the core. Can you develop something to override that for your own purposes... hmmm.
It's a community, the more we all contribute, the better it will be.

User avatar
pe7er
Joomla! Master
Joomla! Master
Posts: 25009
Joined: Thu Aug 18, 2005 8:55 pm
Location: Nijmegen, Netherlands
Contact:

Re: About matching titles query

Post by pe7er » Tue Apr 09, 2024 9:47 am

abomareya wrote:
Tue Apr 09, 2024 8:00 am
What is the query used to find matching titles of articles published in Joomla ?
Check the Articles Model in the Joomla core:
https://github.com/joomla/joomla-cms/bl ... sModel.php
and in particular the getListQuery() method:

It uses the "publish" state
$published = (string) $this->getState('filter.published');
and the "title"
$search = $this->getState('filter.search');

Can it be developed to determine the degree of correspondence between the articles themselves and not just the titles?
I'm not sure what you mean by that.
Joomla's back-end Articles has a search field that searches on title by default.
However if you add 'content:', it will search in the intro and fulltext:
} elseif (stripos($search, 'content:') === 0) {
Kind Regards,
Peter Martin, Global Moderator
Company website: https://db8.nl/en/ - Joomla specialist, Nijmegen, Netherlands
The best website: https://the-best-website.com

abomareya
Joomla! Intern
Joomla! Intern
Posts: 73
Joined: Mon Sep 19, 2022 12:56 pm
Location: Egypt
Contact:

Re: About matching titles query

Post by abomareya » Tue Apr 09, 2024 1:02 pm

No, I do not mean the search box, I mean that when I create a new article from the control panel and give it a title,
a message appears to me that this article already exists, and it adds a number 2 in front of the article’s alias...,

this happens when the title is The article is duplicated
Greetings and Appreciation
www.qelada.org

gws
Joomla! Champion
Joomla! Champion
Posts: 5980
Joined: Tue Aug 23, 2005 1:56 pm
Location: South coast, UK
Contact:

Re: About matching titles query

Post by gws » Tue Apr 09, 2024 1:34 pm

Same name exists in the Trash?


Post Reply

Return to “Joomla! 5.x Coding”