Forum

Thread tagged as: Question, Problem, Addons

what is the correct code for an image bucket ?

I have added the following code below to my content template, which was a modification of the standard image.html content template with the bucket attribute. It loads the image nicely into the specified bucket; however I realized that whenI view the page the region for the image shows up as at text output

<img src="<perch:content type="image" id="image" label="Image" width="800" />" alt="<perch:content type="text" id="alt" label="Description" required="true" help="e.g. Photo of MD John Smith with his best wig on" title="true" bucket="selfportraits"/>" />

Outputs on page as the text below, not a photo as I was expecting.

/perch/resources/self portraits/13-02-28-0100-2-4.jpg
Mark Chen

Mark Chen 0 points

  • 6 years ago

Mark, If you want to output a complete tag then you need to add...

output="tag"

I figured out what I was doing wrong. I had the bucket="portrait" outside the perch image tag and in the description tag which was why it was out putting the text in replacement for the image.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok, great.