[Zope3-dev] Re: ZPT Macros

2005-10-10 Thread Tonico Strasser

Roger Ineichen schrieb:
Hi together 


I like to simplify the macro registration.
The target is to get rid of the mapping in a custom class
where we use right now (StandardMacros) and offer a directive
for register macros in ZCML.

See the proposal at:
http://www.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/SimplifyMac
roRegistration

Can you tell me what you think?


The ZCML directive is invisible on the Wiki, this I copied from the HTML 
source:


browser:macros
  for=*
  name=standard_macros
  macros=page
  aliases=view:page dialog:page(only if we need to 
support the mapping)

  permission=zope.View
  template=template.pt
  layer=tiks.skins.basic.basic
  /

I Like that. I think it would be very useful to be able to configure 
macros and access them in Python, at least for my use cases.


Regarding: html metal:use-macro=macros:standard_macros/my_macro

I'm not sure I want another prefix in ZPT. I would prefer to provide (or 
push?) a custom namespace to the template and then use 
standard_macros/my_macro or simply macros/my_macro.


Tonico

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



RE: [Zope3-dev] Re: ZPT Macros

2005-10-10 Thread Roger Ineichen
Hi Tonico

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On 
 Behalf Of Tonico Strasser
 Sent: Monday, October 10, 2005 1:22 PM
 To: zope3-dev@zope.org
 Cc: [EMAIL PROTECTED]; 'Stephan Richter'
 Subject: [Zope3-dev] Re: ZPT Macros
 
 Roger Ineichen schrieb:
  Hi together 
  
  I like to simplify the macro registration.
  The target is to get rid of the mapping in a custom class
  where we use right now (StandardMacros) and offer a directive
  for register macros in ZCML.
  
  See the proposal at:
  
 http://www.zope.org/Wikis/DevSite/Projects/ComponentArchitectu
 re/SimplifyMac
  roRegistration
  
  Can you tell me what you think?
 
 The ZCML directive is invisible on the Wiki, this I copied 
 from the HTML 
 source:
 
 browser:macros
for=*
name=standard_macros
macros=page
aliases=view:page dialog:page(only if we need to 
 support the mapping)
permission=zope.View
template=template.pt
layer=tiks.skins.basic.basic
/
 
 I Like that. I think it would be very useful to be able to configure 
 macros and access them in Python, at least for my use cases.

After the sprint, I think the problem with such implementations
is, that we are to far away from the development right now. 
Such concept are usefull if the target is UI and skin development,
other wise we don't get feedback and nobody is interessted to
think about it.

I will implement a macro registration in the Tiks framework first,
so we can show this to other developers before we perhaps
move it to the z3 trunk later.

 Regarding: html metal:use-macro=macros:standard_macros/my_macro
 
 I'm not sure I want another prefix in ZPT. I would prefer to 
 provide (or 
 push?) a custom namespace to the template and then use 
 standard_macros/my_macro or simply macros/my_macro.

I know what you mean, but like we discuss at the sprint that are 
two different concepts.

We only can provide a TALES namescape like macros:... otherwise
we have to use a own page template implementation where uses a macro
namespace as a constructor argument.
But then we can't use the browser:page and all this directives for the
registration out of the box.

I prefere a macro namspace for TAL. Otherwise we have to implement
different new ZCML registration directives where are using a custom
page template implementation.

Tonico's vision of templates (see zope3.org):
But note that's not the right solution for what you need. If we 
implement the macro registration and a TALES expression, you only 
can use the registration. For your idea, you will need a own page
template implementation additionaly to the ZCML macro regsitration.

Perhaps the push templates, where I presented at the sprint, are a 
better solution for simplify the page assembling for the future.

Regards
Roger Ineichen

Projekt01 GmbH
www.projekt01.ch
_
END OF MESSAGE  


 Tonico
 
 ___
 Zope3-dev mailing list
 Zope3-dev@zope.org
 Unsub: 
 http://mail.zope.org/mailman/options/zope3-dev/dev%40projekt01.ch
 
 

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] Re: ZPT Macros

2005-10-10 Thread Tonico Strasser

Roger Ineichen schrieb:

I'm not sure I want another prefix in ZPT. I would prefer to 
provide (or 
push?) a custom namespace to the template and then use 
standard_macros/my_macro or simply macros/my_macro.



I know what you mean, but like we discuss at the sprint that are 
two different concepts.


We only can provide a TALES namescape like macros:... otherwise
we have to use a own page template implementation where uses a macro
namespace as a constructor argument.
But then we can't use the browser:page and all this directives for the
registration out of the box.

I prefere a macro namspace for TAL. Otherwise we have to implement
different new ZCML registration directives where are using a custom
page template implementation.


Ok, I don't really understand what this all means. I have trivial use 
cases and don't understand why everything has to be so complicated.


Tonico

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



RE: [Zope3-dev] Re: ZPT Macros

2005-10-10 Thread Roger Ineichen
Hi Tonico

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On 
 Behalf Of Tonico Strasser
 Sent: Monday, October 10, 2005 10:49 PM
 To: zope3-dev@zope.org
 Cc: zope3-dev@zope.org
 Subject: [Zope3-dev] Re: ZPT Macros
 
 Roger Ineichen schrieb:
 
 I'm not sure I want another prefix in ZPT. I would prefer to 
 provide (or 
 push?) a custom namespace to the template and then use 
 standard_macros/my_macro or simply macros/my_macro.
  
  
  I know what you mean, but like we discuss at the sprint that are 
  two different concepts.
  
  We only can provide a TALES namescape like macros:... otherwise
  we have to use a own page template implementation where uses a macro
  namespace as a constructor argument.
  But then we can't use the browser:page and all this 
 directives for the
  registration out of the box.
  
  I prefere a macro namspace for TAL. Otherwise we have to implement
  different new ZCML registration directives where are using a custom
  page template implementation.
 
 Ok, I don't really understand what this all means. I have trivial use 
 cases and don't understand why everything has to be so complicated.

It's only because the macros registration via ZCML and the TALES 
expression isn't the right concept for what you where shoing at the
sprint.

For your idea, you need to implement a custom page template where 
provides a macros namspace. Then you can call macros in TAL like:

metal:block use-macro=macros/myMacro /

If we like to use the standard page template we don't have this 
macro namespace and need a TALES expression for the macro 
lookup like:

metal:block use-macro=macros:myMacro /

Right now without a macros ZCML directive we use macros via a 
additional page (view) hook like:

metal:block use-macro=context/@@macros/myMacro /

In this case the @@macros is a view registred with a own python 
class inherited from the class Macros. Most the time called
StandardMacros (see Rotterdam skin).

I only propose to get rid of this additional python class 
implementation and view registration and like to offer a 
ZCML directive and a TALES namespace explicit for macros.

Regards
Roger Ineichen

 Tonico
 
 ___
 Zope3-dev mailing list
 Zope3-dev@zope.org
 Unsub: 
 http://mail.zope.org/mailman/options/zope3-dev/dev%40projekt01.ch
 
 

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com