Forums / Developer / Expand list of allowed tag nesting

Expand list of allowed tag nesting

Author Message

Alex Jones

Monday 26 April 2004 6:40:13 am

I am working with alpha 3 of 3.4 and am really happy to see that there is more flexibility in nesting tags (em within bold for example). But there is one bit of functionality that I really think should be included, and that is the nesting of lists. I am happy to make the necessary changes and submit them to the project, but I do not know what I need to edit. If someone could point me in the right direction I would be quite appreciative. :)

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Bruce Morrison

Monday 26 April 2004 6:22:07 pm

Interestingly enough the initial betas of eZ 3 allowed nested lists! This has caused a bit of a problem with upgrades to a site we created using these versions. The joys of beta software!

At a guess the file that controls this is kernel/classes/datatypes/ezxmltext/handlers/input/ezsimplifiedxmlinput.php

Cheers
Bruce http://www.designit.com.au/

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

Alex Jones

Tuesday 27 April 2004 6:51:10 am

Thanks for the input Bruce! I'll start my investigations with that file.

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Ben Pirt

Wednesday 28 April 2004 3:45:24 am

I also need to be able to use nested lists in eZ Publish.
I tried modifying the file which was mentioned, but it didn't seem to change anything.
Any idea if this could make it into 3.4 final?
It would be extremely useful,

Thanks,

bjpirt

Alex Jones

Thursday 29 April 2004 12:24:38 pm

I haven't had any luck either. Grrrr. I was hoping this would be a simple modification. Any recommendations from the eZ crew?

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Alex Jones

Thursday 06 May 2004 5:52:17 am

Any pointers from the eZ systems staff would be appreciated!

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Bård Farstad

Monday 10 May 2004 12:41:02 pm

This feature is currently not supported (obviously). However we have said that we should add this, was a discussion some time ago.

To add support for this you can change the document structure definition in:
kernel/classes/datatypes/ezxmltext/handlers/input/ezsimplifiedxmlinput.php

$this->SubTagArray['li'] = array_merge( $this->InLineTagArray, "paragraph" );

You should change this to support section level tags ( like td and th ), which is defined with $this->SubTagArray['section'];

This means that the input is ok. ( not when using OE though, so the same would need to be done for the input handler for OE ).

Then we need to change the rendering. This is done in:
kernel/classes/datatypes/ezxmltext/handlers/output/ezxhtmlxmloutput.php
Search for the rendering of 'ol' and 'ul'. There you will see that all children tags are rendered with the code:

change:
$listItemContent .= $this->renderXHTMLTag( $tpl, $itemChildNode, 0, $isBlockTag );
to:
$listItemContent .= $this->renderXHTMLSection( $tpl, $itemChildNode, 0, $isBlockTag );

Then you need to test for backwards compatibility, so that content is not lost when opening old content.

ps: this is not tested, but the solution is not far from this. We have feature freeze for 3.4 but this should be added to 3.5. A working/tested patch would be appreciated.

--bård

Documentation: http://ez.no/doc

Alex Jones

Wednesday 12 May 2004 6:21:02 am

Thanks Bård! I will try this out on a 3.4 beta install this week. :)

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Kjell Knudsen

Wednesday 02 June 2004 4:59:11 am

uh... Need this ASAP.

Any luck with it Alex?

Think I'll have to pay someone at EZ to do this for our site if not.

-kjell
http://www.icbl.org

Kjell Knudsen
http://www.icbl.org

Alex Jones

Wednesday 09 June 2004 7:43:07 am

Sorry, I have been out of touch for most of the last month (moved 550 miles, and as soon as I was done un-packing, had to go to a tradeshow in Atlanta Georgia). I have not gotten this working as of yet, sorry. I do not know if it is solved in 3.4 or not, I hope it is.

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Paul Forsyth

Wednesday 09 June 2004 8:18:01 am

Its just been checked into the trunk on pubsvn.ez.no. Hopefully the branches will get this shortly. 3.4 should.

paul

--
http://www.visionwt.com

Alex Jones

Wednesday 09 June 2004 8:35:09 am

Great! Thanks for the update Paul.

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Paul Borgermans

Wednesday 09 June 2004 8:49:47 am

We will have to backport it to 3.4 (it is a feature for 3.5). I'm afraid the OE won't be updated until 3.5 either: there will need to be a few more buttons to support this.

It is hard to explain to end-users nested lists don't work yet.

-paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Wenyue Yu

Friday 11 June 2004 12:19:13 am

Hi,

Yes, it is a feature for 3.5 and the updated OE won't be release before 3.5 release.

Thanks for Kjell Knudsen who paid for us and therefore this is added as the first feature of 3.5!

For those who don't use OE and want this feature in 3.4, you can just replace file kernel/classes/datatypes/ezxmltext/handlers/input/ezsimplifiedxmlinput.php and file kernel/classes/datatypes/ezxmltext/handlers/output/ezxhtmlxmloutput.php with those files in svn version 6787.

Regards,
wenyue

eZ debug

Timing: Jan 18 2025 14:55:12
Script start
Timing: Jan 18 2025 14:55:12
Module start 'content'
Timing: Jan 18 2025 14:55:13
Module end 'content'
Timing: Jan 18 2025 14:55:13
Script end

Main resources:

Total runtime0.9748 sec
Peak memory usage4,096.0000 KB
Database Queries239

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0064 589.1797180.8281
Module start 'content' 0.00640.8149 770.0078907.3906
Module end 'content' 0.82130.1534 1,677.3984357.3047
Script end 0.9747  2,034.7031 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00400.4082210.0002
Check MTime0.00150.1541210.0001
Mysql Total
Database connection0.00070.075510.0007
Mysqli_queries0.856087.80892390.0036
Looping result0.00370.37882370.0000
Template Total0.939296.320.4696
Template load0.00200.200720.0010
Template processing0.937296.145820.4686
Template load and register function0.00010.009010.0001
states
state_id_array0.00180.186110.0018
state_identifier_array0.00250.259320.0013
Override
Cache load0.00190.1947820.0000
Sytem overhead
Fetch class attribute can translate value0.00160.159090.0002
Fetch class attribute name0.00230.2313190.0001
XML
Image XML parsing0.00310.313490.0003
class_abstraction
Instantiating content class attribute0.00010.0052250.0000
General
dbfile0.00730.7470530.0001
String conversion0.00000.000530.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
11content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
14content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
22content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
7content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 58
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs