eZ Community » Forums » Setup & design » Custom Object in online Editor
expandshrink

Custom Object in online Editor

Custom Object in online Editor

Thursday 04 September 2008 12:17:24 pm - 6 replies

Hi,

I want to add the custom classes in the online editor insert object options as defined in the ezwebin site i.e vertically_listed_sub_items, horizontally_listed_sub_items. I have tried with the following steps but was not able to get the required result.

First made an entry in the content.ini

[embed]
AvailableClasses[]=itemized_sub_items
AvailableClasses[]=itemized_subtree_items
AvailableClasses[]=highlighted_object
AvailableClasses[]=vertically_listed_sub_items
AvailableClasses[]=horizontally_listed_sub_items
AvailableClasses[]=menu
CustomAttributes[]=offset
CustomAttributes[]=limit
ClassDescription[itemized_sub_items]=Itemized Sub Items
ClassDescription[itemized_subtree_items]=Itemized Subtree Items
ClassDescription[highlighted_object]=Highlighted Object
ClassDescription[vertically_listed_sub_items]=Vertically Listed Sub Items
ClassDescription[horizontally_listed_sub_items]=Horizontally Listed Sub Items
ClassDescription[menu]=Menu
CustomAttributesDefaults[offset]=0
CustomAttributesDefaults[limit]=5

After this I have override the embed.tpl template and made an entry in the override.ini.append.php in the desired siteaccess as follow.

[menu]
Source=content/view/embed.tpl
MatchFile=embed/menu.tpl
Subdir=templates
Match[classification]=menu

But it shows the result of the embed_folder template.
Anyone has idea where i m making mistake.

Regards,

Thursday 04 September 2008 3:16:15 pm

When you create a new embed option using content.ini, you can just put a template called menu.tpl (in your case) in the override/templates/datatype/ezxmltext/ folder in your site design.

You do not need the override rule.

Thursday 11 September 2008 8:09:17 am

I think the answer you specify is for insert custom tag like factbox, quote. I want it to implement in the insert object pattern just like in the ezwebin extension.

Thursday 11 September 2008 9:38:14 am

Try to add class_identifier override Match as well to see if its Match priority that's stopping you.

Thursday 11 September 2008 11:17:36 am

I have tried this but still same result.

Thursday 11 September 2008 9:51:57 pm

And you have tried:
* to give "[menu]" a more unique name
* move it higher in the override.ini file
* cleared cache
* There are now warnings in debug ouput about not finding your override template
* the template is in */override/templates/embed/menu.tpl

I'm just asking since I can't see any obvious reasons why it doesn't work.

Friday 12 September 2008 8:44:40 am

yes, I have already tried these steps but the result was same.

expandshrink

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

36 542 Users on board!

Forums menu