I'm currently developing some customized ZMI pages and I was hoping someone could give me some insight into what the best way would be to do this. I see that Zope 2 uses dtml methods to build the standard ZMI pages but as far as I know (Zope 3 wise) I should rather be using Zope Page Templates to build the pages. I would also like the product to gracefully move on to Zope 3 in future, so that should be taken into consideration as well. Are there perhaps some existsing templates for ZMI that can also be used with Zope 3? -- View this message in context: http://www.nabble.com/Zope-ZMI-Templates-tp14734109p14734109.html Sent from the Zope - General mailing list archive at Nabble.com.
I would strongly advice against building on top of the ZMI. It's dated and as you say, in DTML. It's also too geeky to be acceptable by any client of mine. Personally I'd build something standalone that you have ultimate control over. You can still use things like manage_renameObjects() in your own mnagement interface; which you'd be able to replace once you move to zope 3. Jurian Botha wrote:
I'm currently developing some customized ZMI pages and I was hoping someone could give me some insight into what the best way would be to do this.
I see that Zope 2 uses dtml methods to build the standard ZMI pages but as far as I know (Zope 3 wise) I should rather be using Zope Page Templates to build the pages.
I would also like the product to gracefully move on to Zope 3 in future, so that should be taken into consideration as well.
Are there perhaps some existsing templates for ZMI that can also be used with Zope 3?
-- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com
Jurian, While the ZMI is a bit geeky for the average user, it works quite well inside an iframe. iframes are used by many ajax/web2 (whatever you want to call it) libraries. So in my application (for example) I currently make ajax calls to load specific zmi pages inside tabs of a window layout. I agree with Peter that you are better off building your own interface (if you are going to expose the manage_* methods) but I personally hope the zmi stays around for a while! Tim On Jan 15, 2008 11:02 AM, Peter Bengtsson <peter@fry-it.com> wrote:
I would strongly advice against building on top of the ZMI. It's dated and as you say, in DTML. It's also too geeky to be acceptable by any client of mine. Personally I'd build something standalone that you have ultimate control over. You can still use things like manage_renameObjects() in your own mnagement interface; which you'd be able to replace once you move to zope 3.
Jurian Botha wrote:
I'm currently developing some customized ZMI pages and I was hoping someone could give me some insight into what the best way would be to do this.
I see that Zope 2 uses dtml methods to build the standard ZMI pages but as far as I know (Zope 3 wise) I should rather be using Zope Page Templates to build the pages.
I would also like the product to gracefully move on to Zope 3 in future, so that should be taken into consideration as well.
Are there perhaps some existsing templates for ZMI that can also be used with Zope 3?
-- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Tim Nash wrote:
Jurian, While the ZMI is a bit geeky for the average user, it works quite well inside an iframe. iframes are used by many ajax/web2 (whatever you want to call it) libraries. So in my application (for example) I currently make ajax calls to load specific zmi pages inside tabs of a window layout.
IFRames. You should avoid those. With ajax or similar its easy to skip such stuff and just replace any named container tag. Regards Tino
--On 16. Januar 2008 09:33:58 +0100 Tino Wildenhain <tino@wildenhain.de> wrote:
Tim Nash wrote:
Jurian, While the ZMI is a bit geeky for the average user, it works quite well inside an iframe. iframes are used by many ajax/web2 (whatever you want to call it) libraries. So in my application (for example) I currently make ajax calls to load specific zmi pages inside tabs of a window layout.
IFRames. You should avoid those. With ajax or similar its easy to skip such stuff and just replace any named container tag.
Iframes are still a valid choice in case asynchronous won't work e.g. when you need to load resources from servers != your origin server. Due the security model of asynchronous requests, a browser will only load stuff from the origin server. Iframes are a way to work around this limitation - ugly as you said, but sometimes a good workaround. Ansdeas
Andreas Jung wrote: ...
Iframes are still a valid choice in case asynchronous won't work e.g. when you need to load resources from servers != your origin server. Due the security model of asynchronous requests, a browser will only load stuff from the origin server. Iframes are a way to work around this limitation - ugly as you said, but sometimes a good workaround.
Not only ugly but also a very security threat. Been there, seen a lot important sites fell on their noses when it comes to CSS* and friends. Better find another solution in such cases and allow users to disable support for iframes for better security. *) here: cross site scripting Regards Tino
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Jurian Botha wrote:
I'm currently developing some customized ZMI pages and I was hoping someone could give me some insight into what the best way would be to do this.
I see that Zope 2 uses dtml methods to build the standard ZMI pages but as far as I know (Zope 3 wise) I should rather be using Zope Page Templates to build the pages.
I would also like the product to gracefully move on to Zope 3 in future, so that should be taken into consideration as well.
Are there perhaps some existsing templates for ZMI that can also be used with Zope 3?
You could choose to use a 'zmi_master' template which looked like so:: <metal:x metal:define-macro="master"> <tal:x tal:replace="structure context/manage_page_header" /> <tal:x tal:replace="structure context/manage_tabs" /> <div metal:define-slot="main"> Non-boilerplate goes here. </div> <tal:x tal:replace="structure context/manage_page_footer" /> </metal:x> If you registered that template as a view in your product's 'configure.zcml', e.g.: <browser:page for="*" name="zmi_master" template="zmi_master.pt" /> you can then use it in your own ZMI templates, e.g.: <html metal:use-macro="context/@@zmi_master/macros/master"> <body> <div metal:fill-slot="main"> <h1> Test ZMI Macro </h1> </div> </body> </html> I have attached a tarball of a simple Zope2 product which does this. After installation, you should be able to visit http://localhost:8080/zmi_test to see the results. Tres. - -- =================================================================== Tres Seaver +1 540-429-0999 tseaver@palladion.com Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHjQMy+gerLs4ltQ4RAvHpAJ4h8VuFM3M4v333UU4jB71CJgvNqgCfcnjf YMSO8d3hiDf5eMyG31nn9Ng= =fh+F -----END PGP SIGNATURE-----
Hi again, Tres! Can you point as where we can find this kind of help? Are there some reference manual or similar? (I'm using Zope2) Perhaps on Five manual? Thanks a lot! 2008/1/15, Tres Seaver <tseaver@palladion.com>:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Jurian Botha wrote:
I'm currently developing some customized ZMI pages and I was hoping someone could give me some insight into what the best way would be to do this.
I see that Zope 2 uses dtml methods to build the standard ZMI pages but as far as I know (Zope 3 wise) I should rather be using Zope Page Templates to build the pages.
I would also like the product to gracefully move on to Zope 3 in future, so that should be taken into consideration as well.
Are there perhaps some existsing templates for ZMI that can also be used with Zope 3?
You could choose to use a 'zmi_master' template which looked like so::
<metal:x metal:define-macro="master"> <tal:x tal:replace="structure context/manage_page_header" /> <tal:x tal:replace="structure context/manage_tabs" /> <div metal:define-slot="main"> Non-boilerplate goes here. </div> <tal:x tal:replace="structure context/manage_page_footer" /> </metal:x>
If you registered that template as a view in your product's 'configure.zcml', e.g.:
<browser:page for="*" name="zmi_master" template="zmi_master.pt" />
you can then use it in your own ZMI templates, e.g.:
<html metal:use-macro="context/@@zmi_master/macros/master"> <body> <div metal:fill-slot="main"> <h1> Test ZMI Macro </h1> </div> </body> </html>
I have attached a tarball of a simple Zope2 product which does this. After installation, you should be able to visit http://localhost:8080/zmi_test to see the results.
Tres. - -- =================================================================== Tres Seaver +1 540-429-0999 tseaver@palladion.com Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHjQMy+gerLs4ltQ4RAvHpAJ4h8VuFM3M4v333UU4jB71CJgvNqgCfcnjf YMSO8d3hiDf5eMyG31nn9Ng= =fh+F -----END PGP SIGNATURE-----
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
-- Mis Cosas http://blogs.sistes.net/Garito Zope Smart Manager http://blogs.sistes.net/Garito/670
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Garito wrote:
Hi again, Tres! Can you point as where we can find this kind of help? Are there some reference manual or similar? (I'm using Zope2) Perhaps on Five manual?
I'm afraid I don't know the docs very well: I tend to use the source when memory fails me. ;) Honestly, I typed those examples in off the top of my head, and then created the product to test them: except for a single typo, it Just Worked (TM). Tres. - -- =================================================================== Tres Seaver +1 540-429-0999 tseaver@palladion.com Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHjRoC+gerLs4ltQ4RAsF9AJ9g5kghDMORCsHeD6bM391MuGpLKwCg0erV +9TiFSIzjeSwRGpz720sDGQ= =CytP -----END PGP SIGNATURE-----
participants (7)
-
Andreas Jung -
Garito -
Jurian Botha -
Peter Bengtsson -
Tim Nash -
Tino Wildenhain -
Tres Seaver