eZ Community » Forums » Setup & design » [Solved] Classes for images in OE

[Solved] Classes for images in OE

[Solved] Classes for images in OE

Tuesday 01 September 2009 11:14:24 am - 6 replies

Again, a newbie question happy.gif Emoticon
I would like to set a css class to some images via Online Editor and I understood that I have to add the classes in content.ini.append.php file. I succeded to add classes for links, paragraphs and even bold caracters, by using for example


but I'm unable to add classes to images. I tried with [embed] as I saw in several tutorials, but it applies only when I'm inserting an object (article for example), not when I'm inserting an image. As there's a [embed-type_images] in content.ini.append.php, I tried this too, but still no style appears when inserting or modifying image. Which one is the tag to set class ? Or is there something else to do ?

Modified on Thursday 10 September 2009 6:03:47 pm by Catherine Mollet @work

Friday 04 September 2009 10:24:29 pm

This is working for me (almost default values in settings/override/content.ini.append.php):


And if I want to limit that list for images (since all but the last one are for general objects), I can add (in same file):

# Note: this needs to be defined in [embed] as well to work

Thursday 10 September 2009 1:59:13 pm

Thanks André.
Well, I didn't guess for one second that I had to declare the new class both under [embed] AND [embed-type_images] ... And it works only if you put it on /root/settings/override/content.ini.append.php and not on /root/extension/my_site_design/settings/siteaccess/my_site/content.ini.append.php, as classes for links, etc. are OK in the second one...

Modified on Thursday 10 September 2009 2:00:07 pm by Catherine Mollet @work

Friday 12 February 2010 12:10:00 pm

Is there a way to have a class set to a default of 'true' - be set for an element unless the user deselects it?

I've tried


but it doesn't seem to work.

Modified on Sunday 14 February 2010 5:03:11 am by paul bolger

Wednesday 19 May 2010 7:28:55 pm

You can set it up either in content.ini using:

# For custom attributes:

Or using ezoe_attributes.ini where you can also specify a lot more on how attributes/custom-attributes are shown(see file in ezoe/settings for details).

Saturday 05 February 2011 12:32:26 am

Following the first reply from André R., I was able to add a class of "slide" to my embed images, but only from /settings/override/content.ini.append.php.

When I used /extension/my_project/settings/content.ini.append.php this did not work.

Wednesday 03 August 2011 4:41:46 pm

@Benjamin : I had got the same problem as you. It's because the settings/override/content.ini.append.php reset the value of AvailablesClasses. To fix it, remove the line

on the settings/override/content.ini.append.php file. Then your extension settings should prevail.


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

36 542 Users on board!

Forums menu

Proudly Developed with from