Question

I have somme problem to upload a lot of image. Into my class article i would like to upload multi-images in my attribute image.

Thanks for your feeback.

Was it helpful?

Solution

I would recommend to systematically create a "Gallery" object (either located under the "Article" object, or in the Media library), and then populate it (ie. upload images) using the ezmultiupload extension to push multiple pictures in one shot.

You can check the ezmultiupload extension on its code repo, or use the one that is shipped by default in the builds of eZ Publish Community Project (cf http//share.ez.no/latest ).

Then, to display the picture, you need to alter the "Article" class' full view template, and fetch the related "Gallery" object, then loop through all children of it and display them.

I hope this hels.

OTHER TIPS

Another way would be to upload a single "main image" to the image attribute and then embed the rest of the images within the text of the article. The image attribute is meant to provide a consistent structure for the article's main image (i.e. it can be displayed in a search result, in a list of articles, or in a sidebar preview of an article), where the rest of the images would be less structured in their placement and may vary from article to article.

If you consistently have a large number of images per article that would be appropriate to display as a gallery associated with the article, Nicolas' suggestion would be good.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top