Editing ezpublish/design/standard/templates/content/datatype/edit/eztext.tpl wont change anything

Author Message

Gabriel Ambuehl

Sunday 06 April 2003 11:03:57 am

I was trying to integrate htmlarea into ezpublish (if OE were working in Mozilla, I could see myself paying the 150 bucks but surely not for an IE only solution) and lazy as I am, I figured I could just as well modify the Text type for this.

So I went and tried changing ezpublish/design/standard/templates/content/datatype/edit/eztext.tpl
but whatever I do, it won't end up on the page (not even something along the lines of adding AAAAAAAAA to the file).

From all I can tell, caching is deactivated so I really can't figure it out.

(If anyone already has integrated HTMLArea 3, I'd like to hear about that, of course ;-)

Visit http://triligon.org

Karsten Jennissen

Monday 07 April 2003 12:52:35 am

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

:-)

Karsten

Gabriel Ambuehl

Monday 07 April 2003 6:10:37 am

That's not really what I'm after.

Basically, I'm fine with saving the data in a text field but I want to change the edit template to support HTMLArea.

Basically, I just need to find a way to add a onLoad call to the body tag and some script tags to the header (so the scripts are already loaded when the onLoad call happens).

Visit http://triligon.org

Karsten Jennissen

Monday 07 April 2003 7:47:53 am

That would go into the general page layout, that is in

/design/(yourdesign)/templates/pagelayout.tpl
and
/design/(yourdesign)/override/templates/pagelayout_section_N.tpl

More info on this at
http://ezwiki.blanko.info/index.php/Custom%20designs%20-%20directory%20structure%20explained%20%283.x%29

Regards,
Karsten

Gabriel Ambuehl

Monday 07 April 2003 4:37:45 pm

I already had come to that solution but it kinda sucks for one reason: you'll end up with ALL textareas being HTML editors, even with such where it doesn't make much sense (descriptions of objects for one).

Now HTMLArea can actually just turn some textareas to editors (by using the name attribute of those) but just how am I supposed to know this before the page is assembled?

It would actually work with onFocus events on the textareas in question but it's not exactly an elegant solution either. Whomever decided that only body may have onLoad evets should be shot ;-).

Ah well, maybe I can figure it out. I'll post it, rest assured (works better with IE than with Mozilla at the moment but the script is alpha so...).

Visit http://triligon.org

Peter Bailey

Tuesday 08 April 2003 6:25:06 am

You can attach onload events with just scripting.

window.onload = someFunctionPointer;

If you need multiple events, then you'll need the DOM methods attachEvent and addEventListener, neither of which work in Opera 6 or less and IE5-Mac.

if ( window.attachEvent )
window.attachEvent( "onload", functionPointer );
else if ( window.addEventListener )
window.addEventListener( "load", functionPointer, false );

Of course, for any function-pointer resource you can substitute-in an anonymous function.

Also, the onload event handler applies not only to <body>, but also to <applet>, <embed>, <frame>, <frameset>, <img>, <link>, and <script>

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