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.

eZ debug

Timing: Jan 18 2025 16:06:00
Script start
Timing: Jan 18 2025 16:06:00
Module start 'content'
Timing: Jan 18 2025 16:06:01
Module end 'content'
Timing: Jan 18 2025 16:06:01
Script end

Main resources:

Total runtime0.8992 sec
Peak memory usage4,096.0000 KB
Database Queries208

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0060 587.7266180.8359
Module start 'content' 0.00600.7189 768.5625640.0703
Module end 'content' 0.72490.1742 1,408.6328341.0938
Script end 0.8991  1,749.7266 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00410.4606210.0002
Check MTime0.00150.1672210.0001
Mysql Total
Database connection0.00090.094910.0009
Mysqli_queries0.800689.03892080.0038
Looping result0.00290.32502060.0000
Template Total0.871296.920.4356
Template load0.00230.250920.0011
Template processing0.869096.641320.4345
Template load and register function0.00010.008910.0001
states
state_id_array0.00080.091010.0008
state_identifier_array0.00100.111320.0005
Override
Cache load0.00200.2194380.0001
Sytem overhead
Fetch class attribute can translate value0.00150.162040.0004
Fetch class attribute name0.00180.2047100.0002
XML
Image XML parsing0.00180.195240.0004
class_abstraction
Instantiating content class attribute0.00000.0038140.0000
General
dbfile0.00240.2650390.0001
String conversion0.00000.000630.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
7content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
7content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
9content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 29
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs