[Zope] Re: API and namespace

2000-12-11 Thread Alexander DePauli

Hi Sven, Hi Zopistas!

thank you for your quick and swift answer!

I wish I could understand that piece of code to its full extent...
...I nowhere find a documentation for the methods "NewFolder_add()" and
"Document_add()" in your code - did I miss something or are they just
placeholders for the API-methods like "manage_addFolder" etc.?

Ah, one more question: I'm just a bit confused - is there any reason for
the naming of "manage_addProduct()"? 
This sounds like someone could add a Product (you know, these quite
useful things stored in Zope/lib/python/ - but I merely wish to add some
folders and stuff like this.
Any clue for me so that I understand the concept behind the stage?

All the best + cheers,
Alexander



Sven Hohage schrieb:
 
 Hallo Alexander,
 this works for me-
 
 dtml- with "manage_addProduct['myProduct']"
  dtml- call "NewFolder_add (_.None, _, NoRedir=1)"
 /dtml-with
 dtml-with "_.getitem(idOfNewFolder)"
  dtml- with "manage_addProduct['myProduct']"
   dtml- call "Document_add (_.None, _, NoRedir=1)"
  /dtml-with
 /dtml-with
 Bye
Sven
~
http://www.herrenausstatter.de - Der Online-Herrenausstatter
Kostenlose Serviceline: 0800 -999 66 33
Versandkostenfreie Lieferung - 30 Tage Rückgaberecht
~
Verwaltungsadresse:
DePauli.com Aktiengesellschaft
Stahlgruberring 3 - 81829 München
Telefon: 089 / 530 75 170 - Telefax 089 / 514 50 666

___
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] Re: API and namespace

2000-12-11 Thread Alexander DePauli

Rehi Sven,

thanks a lot for your patience with the dummy - which is me :)

Sorry to say that my problem consists even when applying your snippet.

Your statement
dtml-with "_.getitem('NewFolder')" 
looks fine to me, but ZOPE insists on creating the new document in 
   /OldFolder 
instead of 
   /OldFolder/NewFolder

Some more stuff for wondering:
If I do a 
   dtml-with "_.getitem('NewFolder')" 
   dtml-var "_.getitem('NewFolder',0)"
to get an actual value for testing purposes, ZOPE returns the *correct*
value.

But if I do an additional 
   dtml-in objectItems
id: dtml-var sequence-key,
type: dtml-var meta_type
   /dtml-in
to get the objects in the actual namespace (surely *after* the above
dtml-with.., 
the output is the one of the /OldFolder-namespace, not that of the
/OldFolder/NewFolder.

...I'm sure this is a rookie-problem and can be solved by turning a
switch or two (perhaps in my brain), but I'm stuck.

Do you/anybody has any clue?

Thanks in advance + all the best
Alexander


Sven Hohage schrieb:
 For you this is sufficient -
dtml- call "manage_addFolder (FolderName)"
 
 dtml-with "_.getitem(FolderName)"
 dtml- call "manage_add (DocumnetName)"
 /dtml-with

~
http://www.herrenausstatter.de - Der Online-Herrenausstatter
Kostenlose Serviceline: 0800 -999 66 33
Versandkostenfreie Lieferung - 30 Tage Rückgaberecht
~
Verwaltungsadresse:
DePauli.com Aktiengesellschaft
Stahlgruberring 3 - 81829 München
Telefon: 089 / 530 75 170 - Telefax 089 / 514 50 666

___
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 )