Since I'm new to Zope, I've been able to jump at ZPT from the beginning without needing to "unlearn" DTML first... One thing nags me though: I use ZPT for my product classes web methods when while constructing an intranet. However it doesn't seem that I can use the same web methods inside ZMI, since ZMI still uses DTML and presents its tabs through the DTML variable "standard_header". What do people generally do when using ZPT? Do you create separate editforms/display files for both ZPT (for use in you own application) and DTML (for use in ZMI)? Or have I missed some vital point? - Carsten
What do people generally do when using ZPT? Do you create separate editforms/display files for both ZPT (for use in you own application) and DTML (for use in ZMI)? Or have I missed some vital point?
page templates work fine in the zmi[1] http://www.zope.org/Members/Zen/howto/ZPT_management -- Jamie Heilman http://audible.transient.net/~jamie/ "Most people wouldn't know music if it came up and bit them on the ass." -Frank Zappa [1] except when they don't due to import dependancies, which you may run into if you're trying to re-write some of the core classes
Ahh nice. :-) This reminds me of another thing, that I wanted to ask the Zope community: Do you always create your management forms "by hand"? eg. like this: <form action="manage_editThingy"> <input name="title" /> <input type="submit" value="Change" /> </form> When working in PHP I made a class hierarchy for generating web user interfaces programatically, thus saving a lot of work when trying to make all my interfaces look alike. Basically this went along the lines of (mind you - it's PHP): -------------------------------------------------------------------- // Create html page for edit window $dlg = new UI_TabDialog("Edit article"); $dlg->form_action = "article_update.php?action=new"; // Create 1st tabbed page $page = new UI_TabPage("Main text"); // Create layout manager for page $layout = new UI_Layout_row(array( array(100) )); $c = new UI_Control_textarea("body", "Article body", "", "100%"); $layout->add_control($c); $page->add_control($layout); $dlg->add_page($page); // Create 2nd tabbed page $page = new UI_TabPage("Article properties"); $layout = new UI_Layout_row(array( array(100), array(100), array(100), array(50, 50), array(100) )); $c = new UI_Control_input("header", "Article header", ""); $layout->add_control($c); $c = new UI_Control_date("releasedate", "Releasedate", date("Y-m-d")); $layout->add_control($c); $c = new UI_Control_date("expiredate", "Expiredate", date("Y-m-d")); $layout->add_control($c); $c = new UI_Control_image("image_id", "Image for the article", ""); $c->url_template = "image_%d.jpg"; $layout->add_control($c); $page->add_control($layout); $dlg->add_page($page); // Generate the html page $dlg->draw(); ---------------------------------------------------------------- Has anybody done anything remotely like this in Zope? And if no: Would there be any interest in such a module? The good thing about this class library is the ability to change the outlook of all your user interface pages just one place. At the same time, the layout managers give you some control over the... well - layout of all form elements. :-) - Carsten
-----Oprindelig meddelelse----- Fra: zope-admin@zope.org [mailto:zope-admin@zope.org]Pa vegne af Jamie Heilman Sendt: 30. juli 2003 23:48 Til: Zope@Zope.Org Emne: Re: [Zope] Mixing of ZPT and DTML
What do people generally do when using ZPT? Do you create separate editforms/display files for both ZPT (for use in you own application) and DTML (for use in ZMI)? Or have I missed some vital point?
page templates work fine in the zmi[1] http://www.zope.org/Members/Zen/howto/ZPT_management
On Wednesday, Jul 30, 2003, at 17:32 US/Eastern, Carsten Gehling wrote:
Since I'm new to Zope, I've been able to jump at ZPT from the beginning without needing to "unlearn" DTML first...
One thing nags me though: I use ZPT for my product classes web methods when while constructing an intranet. However it doesn't seem that I can use the same web methods inside ZMI, since ZMI still uses DTML and presents its tabs through the DTML variable "standard_header".
What do people generally do when using ZPT? Do you create separate editforms/display files for both ZPT (for use in you own application) and DTML (for use in ZMI)? Or have I missed some vital point?
- Carsten
If all you want is the tabs you can do something like this:: <h1 tal:replace="structure python: here.manage_tabs(management_view='Foo Edit')"> Foo Edit Form </h1> jens
participants (4)
-
Carsten Gehling -
Carsten Gehling -
Jamie Heilman -
Jens Vagelpohl