Forums / General / Custom tags in Online Editor

Custom tags in Online Editor

Author Message

Andrew Kelly

Tuesday 22 November 2005 12:48:28 am

Hi all,

I'm having what appears to be a known issue regarding custom tags in the OE. Or, more accurately, I'm faced with a situation that many see as an "issue" and many see as logical design. Whatever it actually is, I haven't yet found a clear answer anywhere as to how to approach it.

Regarding custom tags in the OE (whether default or added by me) there is a layer of granual control that seems to be missing. The problem is that no matter how detailed the template is, {$content} is deliverd wrapped in paragraph tags (as apparent standard behavior when dealing with XML blocks).

There are, of course, many instances where a paragraph wrapper completely defeats the design, and I am after any way to control that.

If there was a way to strip the outtermost paragraph tags from {$content}, that would be perfect.
Or, if it were possible to assign a class to that paragraph block, that would be brilliant as well.

Is there anyway at all to do either of these things?

Help very much appreciated, and my great thanks in advance.
Andy

Kirill Subbotin

Thursday 24 November 2005 1:04:56 am

Yes, its a general ez publish problem - everything is wrapped in paragraphs in ezxml, this paragraphs get to the output and you can't control this process.

Although I can propose to fix this on the output level, for example to implement a setting that will strip off inner paragraphs. It could be an array with tag names as index and true/false values.

Nathan Kelly

Friday 25 November 2005 5:41:54 am

Hi Andrew, I'm not 100% clear on your needs but I know that the extra markup can be a pain, in some cases I have used the strip_tags function to get around this issue on the output as Kirill mentioned, however I'm not sure if it will help you with custom tags?

If you haven't already, you can set up the strip_tags function (from PHP) in template.ini.

[PHP]
PHPOperatorList[]
PHPOperatorList[striptags]=strip_tags

Then in you output template code use something like:

{$node.data_map.body.content.output.output_text|wash|striptags}

I'm not sure if this helps, I know it may not be a clean solution but it might get you out of trouble?

Cheers!

Pardon me while I burst into flames...

Andrew Kelly

Friday 02 December 2005 2:24:35 am

Thank you both for your answers, and please forgive the tardy response. I was assuming I'd get mail when a response was posted and didn't.

At any rate, because I'm under a heavy deadline, I just wrapped the output in a <div> container of a certain class, and then redifined paragraphs within to have no margins or padding.

Cheap hack, but got the job done, and at the moment that's the only priority.

I'll investigate your suggestions in the new year when I have a bit of breathing room.

Thanks again, both of you.

Andy

eZ debug

Timing: Jan 31 2025 01:28:04
Script start
Timing: Jan 31 2025 01:28:04
Module start 'content'
Timing: Jan 31 2025 01:28:04
Module end 'content'
Timing: Jan 31 2025 01:28:04
Script end

Main resources:

Total runtime0.1979 sec
Peak memory usage8,192.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0084 587.9219370.3047
Module start 'content' 0.00840.0170 958.22661,005.6094
Module end 'content' 0.02540.1725 1,963.83593,894.6875
Script end 0.1978  5,858.5234 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00502.5070200.0002
Check MTime0.00150.7475200.0001
Mysql Total
Database connection0.00080.387610.0008
Mysqli_queries0.100950.97601410.0007
Looping result0.00140.69241390.0000
Template Total0.171986.910.1719
Template load0.00100.485710.0010
Template processing0.171086.402710.1710
Override
Cache load0.00070.346210.0007
Sytem overhead
Fetch class attribute can translate value0.00211.057210.0021
XML
Image XML parsing0.00030.141010.0003
General
dbfile0.00432.1504200.0002
String conversion0.00000.004330.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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0002 secs