Online Editor - clickable images don't work in editor

Author Message

K259

Thursday 22 April 2004 12:46:17 am

I want to give this topic a little more focus and try to get a solution to it.

Tony told me that "If this does not work then there is a problem with your site setup which is another issue".

Then I confirm that our editors tells me that this has never worked on our installation, and there have to be a site setup problem.

Any advices what I can check out?

--------------from the discussion------------
Hi Tony!

We have always put pictures in the xml-fields by using the add related objects, and then use insert object in the editor. BUT, put a link on an image have never worked for us :/
I've tried it a hundred times, but with no luck. All our upgrades are made by the ez team, and also the OE upgrades.

I then thought that this was not supported in the ez-editor, so I created an attribute on the Image-class called Link. And here could every user add a link to an image, and when adding an image in the editor through related objects and then insert, the image was then clickable. Pretty silly done actually.

I have now removed this code I added from embed_class_5.tpl, but adding links to images still don't work.

When I add a link(insert link) to a related image in the editor, the code which is stored is correct, but the images will not be clickable.

Maybe someone from the ez team can answer this question, since they set up this system..we're soon going to have a course in howto add links to images etc., so this thing has to be operative.

The code from the xml-field which I tested(and all the other editors here have confirmed that this have never worked on our installation) to put a link on an image is like this:

<object id="23791" size="medium" align="center" href="http://www.ez.no/" target="_self" />

...but it's not working :(

Paul Forsyth

Thursday 22 April 2004 1:02:44 am

If you can enter the <object> tag correctly in the admin, and it doesn't render that sounds like a template issue.

Btw, embed_class_5.tpl sounds pretty old, in current releases it is embed_image.tpl. Have you checked the template is able to handle hrefs?

paul

--
www.visionwt.com

K259

Thursday 22 April 2004 2:04:53 am

Hmm..maybe your are into something here Paul :( Btw. we are running 3.3

We have always used embed_class_5.tpl from the v. 3.0:
/override/templates/content/view/embed_class_5.tpl for the images in the editor.

I can see that in our siteaccess/xx/override.ini.append, there are:

[embed_class_5]
Source=content/view/embed.tpl
MatchFile=content/view/embed_class_5.tpl
Subdir=templates
Match[class]=5

What shall actually the right embed.tpl file for handling images in the editor look like?

Tnx

Paul Forsyth

Thursday 22 April 2004 2:13:45 am

I usually pull the latest embed template from design/admin/override/templates/embed_image.tpl. It does the same job but is updated.

Try it and see.

paul

--
http://www.visionwt.com

K259

Thursday 22 April 2004 4:04:02 pm

Tnx Paul :) That was the solution ;)

I wonder why (after 3-4 eZ publish upgrades), from 3.0->3.3 we still have the same old image-template. Maybe some more templates also are old..hmm..have to check it out.

Btw. there should in this tpl be a check if the image-description on the image class is empty or not. If it's empty, there will be a little white space after the image, after the picture or under. The image-description "tag" should not be "listed" if the description field is empty.

Vivek Chopra

Friday 23 April 2004 8:52:23 am

Thanks Paul.

This solution helped me a lot. But the links donot open in a new window. Even though the in the code it says

<object id="23791" size="medium" align="center" href="http://www.ez.no/" target="_blank" />

Still the links open in the same window. I checked the code for embed_image.tpl file but couldn't figure out how to do it. I don't want to mess up the other images on the site.

Thanks
Vivek

-----------------------
Edit:

Never mind. I copied the code from embed_image.tpl from version3.3. I did the trick.

Thanks though
Vivek

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.