Re: [Zope] SiteAccess2: How do I suppress all when managing?

2000-11-08 Thread Aleksander Salwa

On Tue, 7 Nov 2000, Danny William Adair wrote:

 How can I suppress the URL generation in the management screens? I've seen
 the "Z" folder example but it didn't work for me. Everything is fine except
 the management interface.

This example works when you leave blank all properties in your SiteRoot
object (especially 'Path', which is '/' by default). Then you have to
generate SiteRootPATH dynamically. So your 'Set Access Rule Method'
may look like:

Is there a path, and does it start with 'Z'?
dtml-let stack="REQUEST['TraversalRequestNameStack']"
 dtml-if "stack and stack[-1]=='Z'"
  Get rid of 'Z': dtml-call "stack.pop()"
  Put it back logically: dtml-call "REQUEST.setVirtualRoot('Z')"
  
 dtml-else

Is the first-level domain 'hotsite.com'? Ignore sub-domains and port number.
dtml-if "_.string.split(_.string.lower(_.string.split(HTTP_HOST, ':')[0]),'.')
  [-2:]==['hotsite','com']"
 Add physical root: 
 dtml-call "REQUEST['TraversalRequestNameStack'].append('yourFolder')"
 dtml-call "REQUEST.set('SiteRootPATH','/')"
/dtml-if

 /dtml-if
/dtml-let


[EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/





___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] SiteAccess2: How do I suppress all when managing?

2000-11-07 Thread Danny William Adair

How can I suppress the URL generation in the management screens? I've seen
the "Z" folder example but it didn't work for me. Everything is fine except
the management interface.

tia,

CU+Prost,


 .oO( "Du könntest mal einen bauen" )
Danny


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )