Page 1 of 1
"Image" option in Content Editor - Change directory
Posted: Wed Mar 04, 2009 4:37 am
by andrew_syd
Is there any way to change the directory that is used for the "Image" drop-down input in the Content Editor page?
Currently it only lists the images under uploads/images and I would like to change it to something like uploads/images/pages
Thank you.
Re: "Image" option in Content Editor - Change directory
Posted: Wed Sep 02, 2009 6:11 am
by jasononeil
Hey andrew_syd
I was looking to do the same thing today, I assume you're talking about changing the image on a normal page, rather than on a newsletter?
On line 371 of lib/classes/contenttypes/Content.inc.php I found this code:
Code: Select all
$dir = $config['image_uploads_path'];
$data = $this->GetPropertyValue('image');
I changed it to:
Code: Select all
$dir = $config['image_uploads_path'] . "/sidebar";
$data = $this->GetPropertyValue('image');
And that worked for me.
Please note that CMSMS stores these as relative URLs, eg. it will only save "Sidebar01.jpg" not "
www.example.com/uploads/images/sidebar/Sidebar01.jpg", so you have to make sure your image is pointing to the right directory. Ask if you need more help and I can show you what i've done.