Aricles in html

Author Message

Cecilia Contin

Wednesday 26 March 2003 6:00:39 am

Today, I installed the new version of EZP 3.
I updated the database with the script, but I can not see well my articles written in HTML. My article body is a text field datatype.
What can I do? Please, help me.

Paul Forsyth

Wednesday 26 March 2003 7:01:35 am

I had a similar problem when i was using the various svn releases over the rc2 release. I found that with rc2 text fields allowed me to enter html as i wished. But later on I found that the html was instead quoted inline and not rendered by the browser. The reason I took this route was because xml text field didn't allow me to enter complex html.

However, it looks like for this release you can use the tags <literal></literal>, within a xml data field data type to enclose whatever html you wish to enter.

Does this help? You may need to go into your admin and move html and types around.....

Paul

Paul Borgermans

Wednesday 26 March 2003 8:01:16 am

No, the <literal> tag is not meant for this. It is essentially the equivalent of <pre> in xhtml

You may define a custom tag, say html which does what you want. I just extended my local ezp 3.0 with this.

Wanna now more?

1) First edit settings/content.ini and add the custom html tag:
#Under
[CustomTagSettings]
#make a new entry:
AvailableCustomTags[]=html

2) Make a new template html.tpl in
design/standard/templates/content/view/datatypes/ezxmltags

with the content

{$content}

3) surround your html code by

<custom name="html">
your html code
</custom>

4) Voila, you'v dunit
-----------------------
Much much better:

replace the missing html tags with individual custom tags, rather than block wise if appropriate.

Paul

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

Paul Borgermans

Wednesday 26 March 2003 9:08:25 am

Sorry, too fast.

Need to change more: custom tag allows nesting apparently and converts xhtml to ez xml where it can or simply strips the un-supported xhtml tags.

So the code for the input handler needs to be extended for such a html tag to behave for the rest like the literal tag (without generating <pre></pre>)

I'll post the mods when done

Paul

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

Paul Borgermans

Wednesday 02 April 2003 7:09:38 am

Hello,

I uploaded code to allow arbitraty html inside ez xml text fields. This violates the idea of separation between content and presentation, but may be useful in some cases.

See http://ez.no/developer/ez_publish_3/contributions/arbitrary_html_inside_ez_xml_text_fields

This is a first attempt. Feel free to modify it further and post back your comments

Paul

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

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