[opencms-dev] Contentload Images

Michael Emmerich m.emmerich at alkacon.com
Tue Jun 7 14:53:03 CEST 2011


you only can use <cms:contentload> with xml-contents, and not with other 
kind of resoruces.

OpenCms 8 has a <cms:resourceload> tag which works similar to the 
<cms:contentload> tag,but this is not available in OpenCms 7.

You could use a small part of scriplet code to load the required 
resources (via the CmsObject) and put them into the page context to 
iterate them with JSTL afterwards.

Kind Regards,

> I'm currently trying to put together a simple gallery. The idea was to
> allow a user to create an extended folder ( image gallery ), add it to
> the navigation and start putting images in there.
> The site would then make a list of all the galleries within that
> subfolder and once one is selected display all images within.
> And all went well until the final step.
> My contentloader looks like this right now:
> <cms:contentload collector="allInFolderDateReleasedDesc"
> param="/${la}/_galleries/${gallery}%|image" editable="false">
> <cms:contentaccess var="list" scope="page"/>
> <cms:img src="${list.filename}" height="100" width="100" scaleType="1"/>
> </cms:contentload>
> and no matter what exactly it is I change, there's always the same error:
> javax.servlet.jsp.JspException: org.opencms.xml.CmsXmlException:
> Resource "/de/_galleries/example1/example.jpg" is not of required type
> XML content.
>   Reason: Resource "/de/_galleries/example1/example.jpg" is not of
> required type XML content.
>  From what I can tell, the path seems to be correct and the images I
> upload into the respective gallery folders are found. If any new image
> is uploaded it's name will appear within the error message, so the
> sorting by release date (Desc) seems to work too.
> Does anyone have a quick idea or suggestion how to fix this, work around
> this, or display the images in any other way?
> Thanks and good bye.
> - Christian Funken
> ________________
> Bruesselerstr. 85
> D-50672 Koeln c.funken at vucx.de <mailto:c.funken at vucx.de>
> check out our web page: www.vucx.de <http://www.vucx.de/>
> die medienprofis: www.profigilde.de <http://www.profigilde.de/>
> official agent for visual media directory: www.productionparadise.com
> <http://www.productionparadise.com/>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev

Kind Regards,

Michael Emmerich

Alkacon Software GmbH  - The OpenCms Experts
http://www.alkacon.com - http://www.opencms.org

More information about the opencms-dev mailing list