eZ Community » Forums » Setup & design » Fetch image url from rich text editor...
expandshrink

Fetch image url from rich text editor for custom tag

Fetch image url from rich text editor for custom tag

Monday 24 June 2013 9:25:56 am - 4 replies

Hi guys,

 

I'm quite new in eZ Publish and recently working on custom tag containing image caption. The tag will be added to image when it will be selected in rich text editor (in admin panel, during content edition/creation).

 

My issue is how to fetch selected image url?

 

Really appreciate any help as I've stuck on this :/

Monday 24 June 2013 2:59:17 pm

Hello Piotr,

Custom tags and images are not normally combined in the manner you are describing.

Can you share more information on what you are doing and what's not working?

Custom tags are useful tools indeed when working with an XML Block attribute but are separate from embeded image objects and separate image attributes so I'm a little confused.

Without more information I would suggest passing the image ObjectID to the custom tag as a parameter so within the custom tag template you can fetch the image object and use it as needed.

I hope this helps ...

Cheers,
//kracker

Theme: K.Flay - Fvcking Crazy (ft. Eligh & Grieves) ...
Mirror: https://soundcloud.com/kflay/k-flay-fvcking-crazy-ft-eligh

Monday 24 June 2013 3:07:03 pm

Hi kraker,

 

thank you for your input. What I'm trying to achieve is:

 

1. in admin panel open any article containing embedded, in rich text editor, image

2. click on image so it would be selected and then click on Custom Tag icon in rich text editor

3. when Custom Tag popup will open, select "Image Caption" Custom Tag and in input field type caption

4. close Custom Tag popup by clicking OK button

5. added caption should be displayed on page under image and it should be a link to open full image in new tab (e.g. <a href="link_to_image" target="_blank">Added caption</a>blunk.gif Emoticon

Tuesday 25 June 2013 8:00:23 pm

Hi Piotr,

As kracker said, custom tags are separate from embedded image objects and separate image attributes.

Why you aren't using image description field or a new attribute for image object instead a custom tag? It should be much easier happy.gif Emoticon

Wednesday 26 June 2013 1:59:01 pm

Hello Piotr,

I think you could use the image description field as Radek suggests though that might not satisfy all your custom needs.

I think you should be able to do both; use the image description field AND use a custom tag.

Though I would suggest focusing on the custom tag solution. Passing an ObjectID parameter is not hard to do and would allow you to fetch the object properties (like main node url alias) you need to display the image with the custom html solution you describe.

I hope this helps ...

Cheers,
//kracker

Theme: K.Flay - K.Flay - Fleas Navidad ...
Mirror: https://soundcloud.com/kflay/k-flay-fleas-navidad

expandshrink

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

36 542 Users on board!

Forums menu

Proudly Developed with from