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.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 31 2025 04:20:59
Script start
Timing: Jan 31 2025 04:20:59
Module start 'layout'
Timing: Jan 31 2025 04:20:59
Module start 'content'
Timing: Jan 31 2025 04:20:59
Module end 'content'
Timing: Jan 31 2025 04:20:59
Script end

Main resources:

Total runtime0.0132 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0044 588.1328151.2109
Module start 'layout' 0.00440.0024 739.343836.6641
Module start 'content' 0.00680.0049 776.007898.2656
Module end 'content' 0.01170.0015 874.273441.9922
Script end 0.0132  916.2656 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002518.8946140.0002
Check MTime0.00118.5936140.0001
Mysql Total
Database connection0.00064.564810.0006
Mysqli_queries0.002015.075330.0007
Looping result0.00000.083010.0000
Template Total0.00118.610.0011
Template load0.00096.638710.0009
Template processing0.00031.900710.0003
Override
Cache load0.00064.738110.0006
General
dbfile0.00021.653480.0000
String conversion0.00000.052340.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs