Forums / Developer / Online Editor

Online Editor

Author Message

K259

Wednesday 21 April 2004 4:03:22 am

Is it possible to use the "insert link"-icon in the eZ publish editor to put a link on an image?

Tony Wood

Wednesday 21 April 2004 8:19:36 am

Hi,

Yes, the online editor allows you to do this in a WYSIWYG manner. Just add an image to you XML text field. Then right click and add then click link.
Manually:

<object id="99" size="original" align="left" href="http://www.example.com" target="_self" />

tony
--
http://www.visionwt.com

Tony Wood : twitter.com/tonywood
Vision with Technology
Experts in eZ Publish consulting & development

Power to the Editor!

Free eZ Training : http://www.VisionWT.com/training
eZ Future Podcast : http://www.VisionWT.com/eZ-Future

K259

Wednesday 21 April 2004 8:28:45 am

Hmm..doesn't work here.
Is this code in the embed_class_5.tpl?

Is it possible to let me take a look at your embed file for this functionality, just to compare?

Tony Wood

Wednesday 21 April 2004 9:20:22 am

This code should be entered into the XML text field. So you will need to add your image to related object list first and take that object number.

If this does not work then there is a problem with your site setup which is another issue.

Tony Wood : twitter.com/tonywood
Vision with Technology
Experts in eZ Publish consulting & development

Power to the Editor!

Free eZ Training : http://www.VisionWT.com/training
eZ Future Podcast : http://www.VisionWT.com/eZ-Future

K259

Wednesday 21 April 2004 4:41:59 pm

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 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 :(

K259

Thursday 22 April 2004 12:25:35 am

What can actually be the problem with our site setup then?
Hmm.. maybe it's the Link-function which is not working properly?

Tony Wood

Thursday 22 April 2004 9:08:35 am

hmmm,

A problem in deed. It is more than likely a site issue. The only time I have seem problems like this is where files like "embed_class_5.tpl" are not updated when you patch a sight. So if you copy the "embed_class_5.tpl" from "standard" directory into your user directory [the directory where your bespoke templates are]. This might fix the problem. Give it a whirl anyway; but make sure you backup your files first ;-)

We have had this type of problem with search templates, we had modifed them and when the main kernel was patch the new features were not available until we added the new search code.

I hope this fixes your problem

tony
--
http://www.visionwt.com

Tony Wood : twitter.com/tonywood
Vision with Technology
Experts in eZ Publish consulting & development

Power to the Editor!

Free eZ Training : http://www.VisionWT.com/training
eZ Future Podcast : http://www.VisionWT.com/eZ-Future

K259

Friday 23 April 2004 5:41:49 am

Tnx Tony :) 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.