[Zope] Still can't add photo programmatically

Tres Seaver tseaver@palladion.com
Mon, 07 Feb 2000 16:27:32 -0600


Nicholas Piper <pcomm@inorbit.com> wrote:
> 
> I'm very confused as to why I can add Photo
> objects via a URL such as
> 
> http://localhost:8080/Intranet/Stuff/manage_addProduct/Photo/manage_addPhoto
> 
> (with proper 'arguments' of course)
> 
> yet calling
> 
> <dtml-call "PARENTS[0].manage_addProduct.Photo.manage_addPhoto(PARENTS[0],'id', '', 'title', REQUEST)">
> 
> fails. Part traceback is ;

Try this, from within a DTML Method (the 'this()' will apply to the folder)::

  <!-- push Photo product onto top of namespace stack -->
  <dtml-with "manage_addProduct[ 'Photo ' ] }">
    <!-- invoke function in product, passing the folder and other parameters -->
    <dtml-call "manage_addPhoto( this(), nameOfVarWhichHoldsID, ''
                               , nameOfVarWhichHoldsTitle )">
  </dtml-with>


-- 
=========================================================
Tres Seaver         tseaver@palladion.com    713-523-6582
Palladion Software  http://www.palladion.com