Re: [Zope] METAL macros

2006-03-13 Thread John Poltorak
On Mon, Mar 13, 2006 at 07:37:38AM +0100, Andreas Jung wrote:
> 
> 
> --On 12. März 2006 18:00:27 -0800 David <[EMAIL PROTECTED]> wrote:
> 
> > John Poltorak wrote:
> >
> >> I'm having difficulty figuring out how to make METAL macros reusable.
> >> >>
> > Hi John,
> >
> > This is about as simple as it gets (sorry if i misunderstood your
> > question):
> >
> > (1) Name this page template ptMacros
> >
> > 
> > 
> >  This is Page Template template
> > id.
> >
> > 
> >   Copyright 2001, Foobar Inc.
> > 
> >   
> > 
> >
> >
> > (2) name this page template ptTest
> > 
> >
> >  This is Page Template template id.
> >
> > 
> >  Copyright goes here
> > 
> >   
> > 
> >
> 
> ...which is basically the same as in the Zope Book:
> 
> 

What this really needs is a sample website which shows how these snippets 
all work together. Trying to make sense of these little fragments in 
isolation is hard work.

Is there an example of a small sample website which highlights the use of 
macros?

> 
> -aj


-- 
John



___
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] METAL macros

2006-03-12 Thread Andreas Jung



--On 12. März 2006 18:00:27 -0800 David <[EMAIL PROTECTED]> wrote:


John Poltorak wrote:


I'm having difficulty figuring out how to make METAL macros reusable.
>>

Hi John,

This is about as simple as it gets (sorry if i misunderstood your
question):

(1) Name this page template ptMacros



 This is Page Template template
id.


  Copyright 2001, Foobar Inc.

  



(2) name this page template ptTest

   
 This is Page Template template id.


 Copyright goes here

  




...which is basically the same as in the Zope Book:



-aj


   ---
  -   Andreas JungZOPYX Ltd. & Co KG-
 -   E-mail: [EMAIL PROTECTED]   Web: www.zopyx.com, www.zopyx.de -
  ---


pgphKRHra2mDZ.pgp
Description: 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 )


Re: [Zope] METAL macros

2006-03-12 Thread David

John Poltorak wrote:

I'm having difficulty figuring out how to make METAL macros reusable. 

Is it standard practice to put macros into a common folder where they can 
be used by numerous different websites?


I just can't get a handle on how they are supposed to be used.

According to:-

http://www.zope.org/Documentation/Books/ZopeBook/2_6Edition/AppendixC.stx

Macros provide a way to define a chunk of presentation in one template, 
and share it in others, so that changes to the macro are immediately 
reflected in all of the places that share it. Additionally, macros are 
always fully expanded, even in a template's source text, so that the 
template appears very similar to its final rendering.



This does not really tell me how they should be used. Can someone give me 
an example of real world usage?



 


Hi John,

This is about as simple as it gets (sorry if i misunderstood your question):

(1) Name this page template ptMacros


   
  
 This is Page Template template id.



 Copyright 2001, Foobar Inc.

 



(2) name this page template ptTest


 
  
 This is Page Template template id.



Copyright goes here

 


And test it out.

David


___
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] METAL macros

2006-03-12 Thread John Poltorak

I'm having difficulty figuring out how to make METAL macros reusable. 

Is it standard practice to put macros into a common folder where they can 
be used by numerous different websites?

I just can't get a handle on how they are supposed to be used.

According to:-

http://www.zope.org/Documentation/Books/ZopeBook/2_6Edition/AppendixC.stx

Macros provide a way to define a chunk of presentation in one template, 
and share it in others, so that changes to the macro are immediately 
reflected in all of the places that share it. Additionally, macros are 
always fully expanded, even in a template's source text, so that the 
template appears very similar to its final rendering.


This does not really tell me how they should be used. Can someone give me 
an example of real world usage?


-- 
John


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