[solved] 1.9.1 and content_image

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
falkencreative
Forum Members
Forum Members
Posts: 11
Joined: Wed Oct 01, 2008 3:14 am

[solved] 1.9.1 and content_image

Post by falkencreative »

Hello all. I used CMSMS back when it was around 1.6, and I have recently come back to it on a new project.

I'm having some trouble with the standard "{content_image block='image1'}" tag. If I place this in a template, I'm currently getting a "Error retrieving file list" message. Everything I have read seems to indicate that it should work with 1.9.1...

Is there anything I should check?
Last edited by falkencreative on Mon Nov 29, 2010 7:28 am, edited 1 time in total.
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: 1.9.1 and content_image

Post by RonnyK »

I think that there are no images in the uploads/images folder then....

Ronny
falkencreative
Forum Members
Forum Members
Posts: 11
Joined: Wed Oct 01, 2008 3:14 am

Re: 1.9.1 and content_image

Post by falkencreative »

Looks like that is part of the problem... I'm surprised I don't get a more understandable "No images found" message though. Adding images to the uploads directory fixed the issue.

However, can I use the dir="" attribute to specify a folder within the images folder? For example, instead of selecting files from "images" could I select from "images/layout"? When I've tried this so far, it seems to ignore my input and show any files within my uploads directory instead.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: 1.9.1 and content_image

Post by Dr.CSS »

It helps to read the tags Help, /uploads/images/folder/...
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: 1.9.1 and content_image

Post by RonnyK »

And in 1.9-series, there is a field in GlobalSettings, where you can set the default for the call...
Path for {content_image} tag:
Ronny
falkencreative
Forum Members
Forum Members
Posts: 11
Joined: Wed Oct 01, 2008 3:14 am

{FIXED} Re: 1.9.1 and content_image

Post by falkencreative »

@Dr. CSS:
In my defense, all the help says about the tag is:

"(optional) dir - The name of a directory (relative to the uploads directory, from which to select image files. If not specified, the uploads directory will be used.
Example: use images from the uploads/images directory.
{content_image block='image1' dir='images'}"

I had checked the help before I posted. I've tried a variety of options ("/uploads/images/layout/", "images/layout", with and without beginning/ending slashes, etc.) and I haven't had any luck.

@Ronny:
Thanks, but that specifies a single folder ("Relative to the uploads path, specify a directory name"). Putting in multiple directories (for example, "images/layout") doesn't seem to do anything.

Now worries though, I'll go about this in a different way.
Post Reply

Return to “CMSMS Core”