Is there an easy way to tell if a Page Template is valid/invalid? (Meaning the same check that gets done to see if the red exclaimation mark should show up in the ZMI) Ed
My favourite is to run tidy against page templates using the -xml option. I mapped it to a function so I can check the template from within my editor (vim of course). -aj --On Donnerstag, 6. März 2003 09:40 -0700 Edward Pollard <pollej@uleth.ca> wrote:
Is there an easy way to tell if a Page Template is valid/invalid? (Meaning the same check that gets done to see if the red exclaimation mark should show up in the ZMI)
Ed
_______________________________________________ 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 )
-- --------------------------------------------------------------------- - Andreas Jung http://www.andreas-jung.com - - EMail: andreas at andreas-jung.com - - "Life is too short to (re)write parsers" - ---------------------------------------------------------------------
Very nice. However I seek to add an indication of invalid template to a web portal that allows creation and editing the page. You know, reinventing the wheel and all...just wondering how to build this spoke :-) Ed Andreas Jung wrote:
My favourite is to run tidy against page templates using the -xml option. I mapped it to a function so I can check the template from within my editor (vim of course).
-aj
--On Donnerstag, 6. März 2003 09:40 -0700 Edward Pollard <pollej@uleth.ca> wrote:
Is there an easy way to tell if a Page Template is valid/invalid? (Meaning the same check that gets done to see if the red exclaimation mark should show up in the ZMI)
Ed
_______________________________________________ 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 )
-- --------------------------------------------------------------------- - Andreas Jung http://www.andreas-jung.com - - EMail: andreas at andreas-jung.com - - "Life is too short to (re)write parsers" - ---------------------------------------------------------------------
_______________________________________________ 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 )
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Edward Pollard Sent: Thursday, March 06, 2003 9:52 AM To: Andreas Jung Cc: zope@zope.org Subject: Re: [Zope] Invalid Page Template?
Very nice.
However I seek to add an indication of invalid template to a web portal that allows creation and editing the page.
You know, reinventing the wheel and all...just wondering how to build this spoke :-)
Ed
Typically I just reload the page after saving it. Any errors are in a comment at the top. It would be pretty easy to automate this... in emacs, of course. Since I'm not sure what context you're talking about, I can't be more helpful.
Charlie Reiman wrote:
Typically I just reload the page after saving it. Any errors are in a comment at the top. It would be pretty easy to automate this... in emacs, of course. Since I'm not sure what context you're talking about, I can't be more helpful.
I think I mentioned above that its a web portal. Picture the ZMI with 2% of the functionality. So I want to indicated on the directory index screen that a page is unwell. Ed
Call me stupid if you want ... But can you tell me how to do this. :-) Sorry ... I love vim ... but am still learning it's features. On Thu, 2003-03-06 at 11:48, Andreas Jung wrote:
My favourite is to run tidy against page templates using the -xml option. I mapped it to a function so I can check the template from within my editor (vim of course).
-aj
--On Donnerstag, 6. März 2003 09:40 -0700 Edward Pollard <pollej@uleth.ca> wrote:
Is there an easy way to tell if a Page Template is valid/invalid? (Meaning the same check that gets done to see if the red exclaimation mark should show up in the ZMI)
Ed
_______________________________________________ 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 )
-- Edward Muller Interlix - President Web Hosting - PC Service & Support Custom Programming - Network Service & Support Phone: 417-862-0573 Cell: 417-844-2435 Fax: 417-862-0572 http://www.interlix.com
Edward Pollard wrote:
Is there an easy way to tell if a Page Template is valid/invalid? (Meaning the same check that gets done to see if the red exclaimation mark should show up in the ZMI)
Do you mean *exactly* the same check (i.e. calling a method on the ZPT after writing to it)? In that case you want pt_errors() and pt_warnings(), which return None or a sequence of strings describing the error or warning. Cheers, Evan @ 4-am
participants (5)
-
Andreas Jung -
Charlie Reiman -
Edward Muller -
Edward Pollard -
Evan Simpson