[Zope] greedy acquisition problem

SpiderX sp1d3rx at gmail.com
Thu Jul 12 19:34:45 EDT 2007


I have a site, in a folder called 'kb'
you access it via http://webserver/kb
it has a knowledge base. Inside this, is the index_html and I have some
search pages...

---F_problemsearch---
* a form for searching. It's put on the index_html page via
tal:replace="structure here/F_problemsearch"

contents:
<form name="searchbyproblem" action="ProcessSearch">
<input type="text" name="problem" style="color:white;
background-color:green;">
<button type="submit" name="st" value="Simple">Simple</button>
</form>
------
ProcessSearch is a parameterized python script containing:
if st == 'Simple':
  return container.problemsearch(problem=problem)
------
problemsearch (note the missing F_) is the search results. example:
<tr tal:repeat="item here/SQL_search_problems" tal:attributes="bgcolor
python:test(path('repeat/item/even'), '#EEEEF3', '#FFFFFF')">
<td tal:content="item/id" valign="top">ID</td>
<td tal:content="item/title" valign="top">Title</td>
<td tal:content="structure item/problem" valign="top">Problem</td>
<td><form name="selection" action="ShowJustOne"><input type="hidden"
name="ID" tal:attributes="value item/id" value="42"><input type="submit"
value="view"></form></td>
</tr>
------
Clicking on the 'simple' button, it changes the URL to
http://webserver/kb/ProcessSearch?problem=new&st=Simple. Everything works as
expected. However, now I want to add another level. example:
http://webserver/kb/review
and I want to change only the index_html, and search pages (so someone can
review articles after they are submitted). I copied the search pages listed
above in the new 'review' folder. I changed the text of the button in
"problemsearch" above to "review" instead of "view. When I try it out, I go
to http://webserver/kb/review. I type in my search, click "simple" and the
URL changes to this: http://webserver/kb/ProcessSearch?problem=new&st=Simple
I'd  like it to use the files in '/kb/review' before using the files in /kb
and I thought that's what acquisition did (index_html behaves this way!)
however, it's not doing it correctly. The only way I can get it to properly
work is by changing the URL to this: http://webserver/kb/review/ (adding a
trailing slash). This website is used internally by users who will be
manually typing the URL. Is there some way I can get
http://webserver/kb/review to work as well as http://webserver/kb/review/ ?

-- 
Thanks,
Derek Wilson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope/attachments/20070712/71460539/attachment.htm


More information about the Zope mailing list