On Fri, 2002-05-24 at 11:35, Toby Dickenson wrote:
On Friday 24 May 2002 5:44 pm, Matt Standish wrote:
Hello- I have a simple question. I would like to do this: <dtml-with <dtml-var group>> But of course it does not work. <dtml-var group> Is a value in my MySql database. It also represents a directory name in my Zope tree. Meaning is the user is in the engineering group they will be forced into the engineering directory. Did that make any sense?
So you want to search the dtml namespace for something with the name 'group'. Then, search the dtml namespace for something whose name is the same as the value you found in the first search ?
That would be:
<dtml-with "_[group]">
Searching the whole dtml namespace for that directory may not be the best idea. What happens if something earlier in the search order has the same name? for example, it is unlikely you would find the right directory if 'group' contained the string 'title'.
I suggest you write a short python script which checks only in the places you expect to find these directories.
Humm... Here is exactly what I am doing. I am writing a development Portal (in compliance with SEI level 4 standards) that keeps tracks of problem reports and Task tracking etc.. I would like to give each team (QA Engineering Database etc.) there own squishdot site. So what I have is a call to the database when the page loads <dtml-call expr="REQUEST.set('uid',AUTHENTICATED_USER)"> <dtml-in viewUser_sql> The page then displays all there User information. Halfway through the screen I do this: <dtml-with forum> # a folder containg all the Squishdot sites <dtml-var ls> # A dtml-method I wrote to list the last message posted and options to reply under forum is /database /engineer /qa etc.. The only problem is that I can't figure out how to use dtml-with to change to the users groups forum. The Zope site itself is small, just a bunch of SQL and Forms. Am I going about this the wrong way? Any help would be appreciated.