Re: [Zope-dev] dynamically using inheritance

2002-02-04 Thread Ed Colmar


Thanks for the reply.  

I tried this out, and I'm getting a key error:

Hmmm...  Any other suggestions?  Should I specify with PARENTS first?


Thanks again!

-e-


Site Error
An error was encountered while publishing this resource. 

KeyError

Sorry, a site error occurred.

Traceback (innermost last):
  File /usr/local/dc/zope/lib/python/ZPublisher/Publish.py, line 223, in 
publish_module
  File /usr/local/dc/zope/lib/python/ZPublisher/Publish.py, line 187, in 
publish
  File /usr/local/dc/zope/lib/python/Zope/__init__.py, line 226, in 
zpublisher_exception_hook
(Object: dev_site)
  File /usr/local/dc/zope/lib/python/ZPublisher/Publish.py, line 171, in 
publish
  File /usr/local/dc/zope/lib/python/ZPublisher/mapply.py, line 160, in 
mapply
(Object: index_html)
  File /usr/local/dc/zope/lib/python/ZPublisher/Publish.py, line 112, in 
call_object
(Object: index_html)
  File /usr/local/dc/zope/lib/python/OFS/DTMLDocument.py, line 199, in 
__call__
(Object: index_html)
  File /usr/local/dc/zope/lib/python/DocumentTemplate/DT_String.py, line 
546, in __call__
(Object: index_html)
  File /usr/local/dc/zope/lib/python/DocumentTemplate/DT_With.py, line 
133, in render
(Object: _[skinname])
  File /usr/local/dc/zope/lib/python/DocumentTemplate/DT_Util.py, line 
231, in eval
(Object: _[skinname])
(Info: _)
  File string, line 2, in f
(Object: guarded_getitem)
  File /usr/local/dc/zope/lib/python/AccessControl/DTML.py, line 104, in 
guarded_getitem
(Object: index_html)
  File /usr/local/dc/zope/lib/python/AccessControl/ZopeGuards.py, line 
151, in guarded_getitem
KeyError: skins.default




On Mon, 4 Feb 2002, R. David Murray wrote:

 On Sat, 2 Feb 2002, Ed Colmar wrote:
  dtml-call REQUEST.set('skinname', 'skins.default')
  dtml-with _.string(skinname)
 
 This is a [EMAIL PROTECTED] question rather than a zope-dev
 question, but:
 
 dtml-with _[skinname]
 
 should solve your problem.  That looks the string held in
 skinname up in the namespace and passes it to dtml-with.
 
 --RDM
 
 
 ___
 Zope-Dev maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope-dev
 **  No cross posts or HTML encoding!  **
 (Related lists - 
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope )
 


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



Re: [Zope-dev] dynamically using inheritance

2002-02-03 Thread R. David Murray

On Sat, 2 Feb 2002, Ed Colmar wrote:
 dtml-call REQUEST.set('skinname', 'skins.default')
 dtml-with _.string(skinname)

This is a [EMAIL PROTECTED] question rather than a zope-dev
question, but:

dtml-with _[skinname]

should solve your problem.  That looks the string held in
skinname up in the namespace and passes it to dtml-with.

--RDM


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



[Zope-dev] dynamically using inheritance

2002-02-02 Thread Ed Colmar


Hey all. 

I'm working ona little skinning implementation where I want to pull a 
folder name out of a database, then navigate to it to get dtml methods.

Hardcoding it is easy, but how exactly would I insert a variable into this 
simple dtml-with?

dtml-with skins.default
dtml-var standard_skin_appearance
/dtml-with

to get an idea of how the site is layed out, here's where the skins 
and inside data would live:

www.mysite.com:8080/skins/default/standard_skin_appearance

I tried variations on:

dtml-call REQUEST.set('skinname', 'skins.default')
dtml-with _.string(skinname)

with no luck...  

In the docs, I'm seeingt that it shoulod be possible with the right 
syntax.  What would that be?

Thanks so much!

-ed-


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