Share » Forums » Developer » Display images between the article body

Display images between the article body

Display images between the article body

Monday 26 April 2004 6:39:29 am - 2 replies

Author Message

Balazs Halasy

Monday 26 April 2004 7:03:41 am

In order to achieve the stuff that you wish to achieve, do this:

Don't add any more attributes to the article class.
Use the power of related objects instead.

Example:

1) Create a couple of images in the "Media" part of eZ publish.
2) Edit an article.
3) Click on the small magnify glass icon (on the right).
4) Locate & select the images that you wish to include (navigate to media using the menu on the left).
5) Back in the article edit mode, the images will be displayed on the right hand side.
6) Copy and paste the XML code that is under each image into the desired positions within the body text-field (this will tell eZ publish to display the images).
7) Publish the thing.

That's it; may the force be with you!

Balazs

PS: Depending on the eZ publish version you're using, you might have to create an override template for images within XML code.

Muhammad Khalid Majeed

Tuesday 04 May 2004 12:45:56 am

Thank Balazs Halasy

But there is a problem. I edit the article class and add 6 more images. Now when i enter any aritcle add more images in it. Now when i need to display the article on the page the body comes in one string only. and it can't display the images by the customized locations. like http://arabia.autospeed.com/cms/A_0174/article.html.

I also try to explode the body by <br> but later i come to know that explode function is not working on string.

Can any one help me in this issue.

Muhammad Khalid
Software Engineer
www.webgurru.net

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu