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