Page 1 of 1

[solved]Simple tag issue - {content_image}

Posted: Thu Oct 29, 2009 1:21 pm
by Monkofdoom
Hello,

I'm working from a clear installation of 1.6.6 and I'm experiencing an issue adding a tag to my template.

I added: {content_image block='imageTest'} into my template and saved.

Then I proceeded to adding a new page and under the parent drop down it has:

ImageTest:
Error retrieving file list


From what I had read/gathered I didn't need to do anything else so I'm a bit confused - If anyone has any solutions that would be great.

I'd also be interested in links to any documentation I may have missed if there is something explaining what I should have done?

Thank you.

Re: Simple tag issue - {content_image}

Posted: Thu Oct 29, 2009 1:57 pm
by Ziggywigged
IIRC, the default path is uploads/images. Are your images stored there? Otherwise you'll have to configure the correct path in the tag.

Re: Simple tag issue - {content_image}

Posted: Thu Oct 29, 2009 2:07 pm
by Monkofdoom
Thank you for your response,

I have added a couple of images using the default image manager, and having checked the ftp they are in uploads/images.

So would you assume the error here is how the tag is locating my images? (ie directory somewhere) rather than I'm meant to have done something else where.

Thank you

Edit:
I've just tried setting dir='uploads/images' just to be sure and it is still behaving the same.

I've also checked the permissions of those directories and the images they contain.

Re: Simple tag issue - {content_image}

Posted: Fri Oct 30, 2009 6:18 pm
by Dr.CSS
If you look at the Help and how it writes the tag you will note the / at the end of it uploads/images/ this is telling it look in this folder and you will find files to populate the drop down, if you only want these used in this tag you may be able to do uploads/anewfolder/ so the images aren't used it the page when someone goes to add images when editing a page...

Re: Simple tag issue - {content_image}

Posted: Mon Nov 02, 2009 11:48 am
by naturelab
Hello :-

I am getting exactly the same thing.

Again, I'm on 1.6.6 and experiencing the same issue when adding the tag to my template.

When I add {content_image block='image1'} into my template, the content block does not show up at all. No content block, no drop down. All I get is the message  :-

Code: Select all

Image1:
Error retrieving file list
Just before the "Submit / Cancel / Apply " buttons at the bottom of the page.

On the front end, nothing is written to the page, no image tag and no error, apart from on the homepage - index.php

where it correctly writes

Code: Select all

<img src="uploads/images/logo1.gif" name="image1" />
to the page.

Any ideas ? This feels like I am overlooking something simple. But I am not trying to do anything complicated.

I have been using CMSMS for about 3 years, but have never used this tag before.

Re: Simple tag issue - {content_image}

Posted: Mon Nov 02, 2009 12:12 pm
by Monkofdoom
Hello guys and thank you for your responses.

I have now solved this problem and as expected it was something simple - naturelab I'm sure this will fix it for you as well.

However! Reading over the documentation again I noticed it says starting in the uploads folder, so you should NOT include the uploads/ in the directory path.

If you do not set a path, then upload an image directly into uploads and it will work.

I have used the following:

Code: Select all

{content_image block='imageTest' dir='images/'}
Where images is located within the uploads folder and contains an image.

Thank you and I hope this helps anyone else who comes accross this, I knew it would be something simple -_-


On a "next step" note, is there any method available for adding an alt tag text field to the edit, to allow the user to add a unique alt tag for the image.

I see:
(optional) alt - Alternative text if the image cannot be found.
exists but it's a fixed tag for varying images.

Re: [solved]Simple tag issue - {content_image}

Posted: Mon Nov 16, 2009 10:59 am
by naturelab
Monkofdoom - thanks for your help. As I thought, just a stupid misunderstanding on my part, although I do think the documentation for this is slightly ambiguous. All working now - cheers.

Re: [solved]Simple tag issue - {content_image}

Posted: Tue Jul 27, 2010 12:03 pm
by sonia
Hi There,

Today we had the same issue with generating unique alt tags and managed to adapt this solution for captions: http://forum.cmsmadesimple.org/index.php/topic,37374.0.html

We just applied the additional content block to the alt tag...

{capture assign='caption_var'}{content_image block='Caption Image' dir='images' urlonly='true'}{/capture}
{if ($caption_var)}
 
     
 
{/if}