Elxis CMS Forum

Support => Elxis 4.x/5.x DEV => Topic started by: seadhna on September 27, 2019, 15:05:19

Title: Can't select the right image for an article
Post by: seadhna on September 27, 2019, 15:05:19
Hi there - in Elxis 5.0 when creating a new article, we can upload an image or select one from a dropdown. However, the drop-down list only features a limited number of images, seemingly chosen at random. It's not possible to manually type in the path to an image if it doesn't appear in this drop-down. Therefore we have to upload the image - even though we know it is already on the server. Is there a way to fix this limitation?
Title: Re: Can't select the right image for an article
Post by: webgift on September 27, 2019, 16:21:22

As far as i can see, content component return the 100 images in Descending order.
You can edit the following number (100) to the one you would like to.
File: elxis5/components/com_content/controllers/aarticle.php
Line: 661

$images = $this->model->fetchArticlesImages(100); //change the 100 with a number greater than 1.

// I know that it's not a good option however it's the fastest one!
Title: Re: Can't select the right image for an article
Post by: seadhna on October 01, 2019, 12:03:09
thanks webgift - i will try this - hopefully no performance issues - it would be much quicker if we could just enter a path manually (e.g. copy an image location from the front-end, or search for an image name).
Title: Re: Can't select the right image for an article
Post by: webgift on October 01, 2019, 14:25:39

Search for an image name would be great i know. We have to create an
AJAX request.