[Zope] DTML -> ZPT

2006-08-31 Thread Antonio Beamud Montero
Is this the equivalence?



http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] nested metal macros

2006-08-22 Thread Antonio Beamud Montero
El mar, 22-08-2006 a las 19:34 +0200, Dieter Maurer escribió:
> Antonio Beamud Montero wrote at 2006-8-22 19:21 +0200:
> > ...
> >Ok... I want to define a template (like a skeleton), other template
> >(like the body of the skeleton) and lot of templates in sections of the
> >body of the skeleton and reuse the skeleton and the body across all my
> >web... How I can do that?
> 
> I do not understand what you precisely want to achieve.
> 
> However, you could get something like the example in your
> original post by:
> 
>*  define "macroB" at the page level (it uses "macroA")

>*  make your former "macroB" a "macroC" and define it inside a slot.

Sorry, but I don't understand this... can you give me a simple example
(I think is the same I have tried before..)

A lot of thanks


>*  then you can use "macroB" (which will use "macroA" in turn)
>   and fill the slot with a use of "macroC" (or something else).
> 
> 
> 

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


Re: [Zope] nested metal macros

2006-08-22 Thread Antonio Beamud Montero
El mar, 22-08-2006 a las 19:13 +0200, Dieter Maurer escribió:
> Antonio Beamud Montero wrote at 2006-8-22 08:46 +0200:
> > ...
> >- MacroB
> >http://xml.zope.org/namespaces/metal";
> > metal:use-macro="container/macroA/macros/macroA">
> >
> >   
> >  
> >   
> >
> >
> 
> "macroB" is only the inner "div" not the complete content of
> your page template.
> 
> > ...
> >I think all the process is as follows:
> >Page calls macroB, macroB calls macroA, and all the code is rendered,
> >the problem is only the code inside macroB is rendered... 
> 
> "macroB" does not call "macroA" because "macroB" does not
> contain a "use-macro" for "macroA".
> 
> >It's posible to nest macros this way?
> 
> Not the way you try it...

Ok... I want to define a template (like a skeleton), other template
(like the body of the skeleton) and lot of templates in sections of the
body of the skeleton and reuse the skeleton and the body across all my
web... How I can do that? It's posible or only one level of macro
definitions is posible? Where I can find examples or resources about
that...?

A lot of thanks.

> 
> 

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


[Zope] nested metal macros

2006-08-21 Thread Antonio Beamud Montero
Hi all:
I'm trying to nest several macros but only the last is showed.
I define for example macroA with a slot named slotA for example.
macroB uses macroA and fills slotA, but also defines a slot.. something
 like this:
- MacroA 

http://www.w3.org/1999/xhtml";
  xmlns:tal="http://xml.zope.org/namespaces/tal";
  xmlns:metal="http://xml.zope.org/namespaces/metal";
  metal:define-macro="macroA">




- MacroB
http://xml.zope.org/namespaces/metal";
 metal:use-macro="container/macroA/macros/macroA">

   
  
   


-Page

And last I use the macroB with:
http://xml.zope.org/namespaces/metal";
 metal:use-macro="container/macroB/macros/macroB">
 
 
 Hello!
 


I think all the process is as follows:
Page calls macroB, macroB calls macroA, and all the code is rendered,
the problem is only the code inside macroB is rendered... 
It's posible to nest macros this way?

Greetings.

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


Re: [Zope] Re: Not authorized to access binding

2006-05-25 Thread Antonio Beamud Montero
El jue, 25-05-2006 a las 12:49 -0400, Tres Seaver escribió:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> Your template uses 'here', which is and alias for the 'context' binding,
> i.e. the object through which the template was acquired.  That object
> has permission settings which prevent anonymous access *to the object*,
> which makes its use in a path expression impossible, even though the
> 'absolute_url' method of that object *would* be accessible by anonymous.
> 
> If this template needs to be renderable by anonymous users even for
> contexts to which they do not have access, then you can give the
> template a proxy role which *does* have access.  Use with caution, and
> double check that the template won't expose any data which *should* be
> protected.

How I can do it in the Product code? I cannot find in the API...

A lot of thanks

> 
> Tres.
> - --
> ===
> Tres Seaver  +1 202-558-7113  [EMAIL PROTECTED]
> Palladion Software   "Excellence by Design"http://palladion.com
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.1 (GNU/Linux)
> Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
> 
> iD8DBQFEdeA0+gerLs4ltQ4RAh8NAJ4x4u6UZ1L56x60f6gaXUzV/yX6igCcCEFV
> 2ug9atblCMjSgqPiYtU6nOI=
> =2Cnb
> -END PGP SIGNATURE-
> 
> ___
> Zope maillist  -  Zope@zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )

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


[Zope] Not authorized to access binding

2006-05-25 Thread Antonio Beamud Montero
Hi all:
I'm using Zope 2.7. I have created a product that inherits from Folder.
The security assertions are::

security = ClassSecurityInfo()
security.declareObjectProtected('View management screens')

But I need to publish some ZPT methods public. I have declared them:

security.declarePublic('my_stations')
my_stations = PageTemplateFile('wsdl/my_stations.wsdl.zpt',
globals())
my_stations.content_type = 'text/xml'

And 'wsdl/my_stations.wsdl.zpt' has only a reference to absolute_url in:
---
...
 
http://localhost:8000/ccx/StationsService"/>

...

The problem is trying to access to this method as anonymous user gives
me:

...
Module Products.PageTemplates.Expressions, line 189, in _eval
Module Products.PageTemplates.Expressions, line 145, in _eval
__traceback_info__: here

Module Products.PageTemplates.Expressions, line 323, in restrictedTraverse
__traceback_info__: {'path': [u'absolute_url'], 'TraversalRequestNameStack': []}

Module Shared.DC.Scripts.Bindings, line 176, in __getattr__
Module Shared.DC.Scripts.Bindings, line 182, in __you_lose
Unauthorized: Not authorized to access binding: context (Also, an error 
occurred while attempting to render the standard error message.)

With other methods declared publics all works ok (like published via SOAP)... 
Can any one help me?

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


Re: [Zope] ZPT and attributes

2005-04-08 Thread Antonio Beamud Montero
El vie, 08-04-2005 a las 16:55 +0200, Lennart Regebro escribió:
> On Apr 8, 2005 4:51 PM, Antonio Beamud Montero
> <[EMAIL PROTECTED]> wrote:
> > Hi all:
> > How I can create attribute names dynamically?
> 
> tal:attributes="attributename expression"

Sorry, I haven't explain the problem correctly :)
The problem is the number of "refX" depends on the list of urls, i.e. if
I have ['http://foo', 'http://boo', 'http://google.com'] then I create:



but with ['http://foo'] I create:



How I create refX?

Greetings.


> For example, I want something like this:
> http://boo";;
>   ref2 request/URL3" />
> 
> And so on.
> 

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


[Zope] ZPT and attributes

2005-04-08 Thread Antonio Beamud Montero
Hi all:
How I can create attribute names dynamically?
For example, I want something like this:
http://boo"; ref2="http://foo"; ...>

Where ref1 and ref2, are created by the url list.
I have done in DTML because I cannot with ZPT.

Thanks... 

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