Forums / Setup & design / Custom Object in online Editor

Custom Object in online Editor

Author Message

Mohammad Tufail

Thursday 04 September 2008 3:17:24 am

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,

Mark Marsiglio

Thursday 04 September 2008 6:16:15 am

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.

http://www.thinkcreative.com
Turning Ideas Into Strategic Solutions

Mohammad Tufail

Wednesday 10 September 2008 11:09:17 pm

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.

André R.

Thursday 11 September 2008 12:38:14 am

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

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Mohammad Tufail

Thursday 11 September 2008 2:17:36 am

I have tried this but still same result.

André R.

Thursday 11 September 2008 12: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.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Mohammad Tufail

Thursday 11 September 2008 11:44:40 pm

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