[Checkins] SVN: z3c.contents/trunk/src/z3c/contents/contents.pt When ContentsPage.allowSearch is set to False, ContentsPage.searchForm is left as None. contents.pt was calling render on ContentsPage.searchForm whether allowSearch was true or false. This was causing a:

Randy Crafton randycrafton at gmail.com
Sat Jun 21 12:45:42 EDT 2008


Log message for revision 87629:
  When ContentsPage.allowSearch is set to False, ContentsPage.searchForm is left as None. contents.pt was calling render on ContentsPage.searchForm whether allowSearch was true or false. This was causing a:
  
  TraversalError: (None, 'render')
  
  Add a tal:condition in contents.pt to the fieldset where searchForm was rendered to avoid the error.
  
  

Changed:
  U   z3c.contents/trunk/src/z3c/contents/contents.pt

-=-
Modified: z3c.contents/trunk/src/z3c/contents/contents.pt
===================================================================
--- z3c.contents/trunk/src/z3c/contents/contents.pt	2008-06-21 15:34:39 UTC (rev 87628)
+++ z3c.contents/trunk/src/z3c/contents/contents.pt	2008-06-21 16:45:41 UTC (rev 87629)
@@ -1,6 +1,6 @@
 <div metal:use-macro="macro:form">
   <div metal:fill-slot="main">
-    <fieldset>
+    <fieldset tal:condition="view/allowSearch">
       <legend>Search</legend>
         <tal:block replace="structure view/searchForm/render">search form</tal:block>
     </fieldset>



More information about the Checkins mailing list