Re: [Zope] Reusing standard_html_header/footer

2000-07-07 Thread Michael Gutmann

>On Thu, 6 Jul 2000, Bill Anderson wrote:
>
>> Michael Gutmann wrote:
>> > 
<...>
>>
>> Not quite sure I understand what you are trying to do but
>
<...>
>Well, okay, not exactly, since we're talking acquisition not inheritance.
>But, the idea is the same. He wants to display the previous
>standard_html_header, with some additional stuff added, in his SubFolder's
>standard_html_header.
>
>--Jeff

Right, at least you got my point. But I didn't get Bill's Mail, or 
else I would have tried to explain it to him. Did it come over the list??

A little confused,
Michael

-- 
Michael Gutmann M.A.
[EMAIL PROTECTED]
Universitaetsrechenzentrum Heinrich-Heine-Universitaet Duesseldorf

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




Re: [Zope] Reusing standard_html_header/footer

2000-07-06 Thread Jeff K. Hoffman

On Thu, 6 Jul 2000, Bill Anderson wrote:

> Michael Gutmann wrote:
> > 
> > This is not a question, I think it's more a request for comment.
> > 
> > Problem: I have the following structure of folders. The top folder has
> > the global standard_html_header and acquisition has it, that it
> > is usable in all the subfolders.
> > 
> > /
> >   standard_html_header
> >   SubFolder1/
> >  SubFolder2/
> > 
> > Now I have a small modification in my headers from SubFolder1 downwards.
> > Well, there are many ways to cope with that problem, I want to do it
> > that ways: I want to integrate the old standard_html_header into the
> > new one I define in SubFolder1. Ok, that can look like this:
> >
>
> Not quite sure I understand what you are trying to do but

I believe he is trying to do (in Java, because it's easiest for me to
express it, here):

public class StandardHtmlHeader
{
  public String render() {
return "Hello, World."
  }
}

public class SubStandardHtmlHeader extends StandardHtmlHeader
{
  public void render() {
return super() + " Woohoo!"
  }
}

Well, okay, not exactly, since we're talking acquisition not inheritance.
But, the idea is the same. He wants to display the previous
standard_html_header, with some additional stuff added, in his SubFolder's
standard_html_header.

--Jeff

---
Jeff K. Hoffman   704.849.0731 x108
Chief Technology Officer  mailto:[EMAIL PROTECTED]
Going Virtual, L.L.C. http://www.goingv.com/


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




Re: [Zope] Reusing standard_html_header/footer

2000-07-06 Thread Bill Anderson

Michael Gutmann wrote:
> 
> This is not a question, I think it's more a request for comment.
> 
> Problem: I have the following structure of folders. The top folder has
> the global standard_html_header and acquisition has it, that it
> is usable in all the subfolders.
> 
> /
>   standard_html_header
>   SubFolder1/
>  SubFolder2/
> 
> Now I have a small modification in my headers from SubFolder1 downwards.
> Well, there are many ways to cope with that problem, I want to do it
> that ways: I want to integrate the old standard_html_header into the
> new one I define in SubFolder1. Ok, that can look like this:
>
Not quite sure I understand what you are trying to do but

in your root standard_html_header:

  


And then put the additions in local_header.

Might get you what you want.

-- 
"Linux: the operating system with a CLUE...
Command Line User Environment".

seen in a posting on comp.software.testing

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




Re: [Zope] Reusing standard_html_header/footer

2000-07-06 Thread Michael Gutmann

>On Thu, 6 Jul 2000, Michael Gutmann wrote:
>
>> :-(  Second try: 
>>  Well, this gives me the right object, but it isn't rendered. As
>>  I reviewed the list archive, I found out, that this seems to be
>>  normal. Maybe somebody can explain why, if he/she has 
>>  some sparetime.
>
>I haven't tried this and I am FAR from being a Zope expert. But, did you
>try dtml-call? Shouldn't that work?

Hm, as I understood - and watching the results after a try - a dtml-call 
has no output.

Michael

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




Re: [Zope] Reusing standard_html_header/footer

2000-07-06 Thread Nils Jeppe

On Thu, 6 Jul 2000, Michael Gutmann wrote:

> :-(   Second try: 
>   Well, this gives me the right object, but it isn't rendered. As
>   I reviewed the list archive, I found out, that this seems to be
>   normal. Maybe somebody can explain why, if he/she has 
>   some sparetime.

I haven't tried this and I am FAR from being a Zope expert. But, did you
try dtml-call? Shouldn't that work?




___
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] Reusing standard_html_header/footer

2000-07-06 Thread Michael Gutmann

This is not a question, I think it's more a request for comment.

Problem: I have the following structure of folders. The top folder has
the global standard_html_header and acquisition has it, that it
is usable in all the subfolders. 

/
  standard_html_header
  SubFolder1/
 SubFolder2/

Now I have a small modification in my headers from SubFolder1 downwards.
Well, there are many ways to cope with that problem, I want to do it 
that ways: I want to integrate the old standard_html_header into the
new one I define in SubFolder1. Ok, that can look like this:




The problem I have to solve now, is to load the old standard_html_header.

Solution: I will give you all my tries, just for fun :-))

:-( First try:  
The easy way certainly doesn't work. It gives a nice error:
"SystemError: infinite recursion in document template"
And it shows you, that Zope really is quick. It does the 
infinite loop in less than 30 seconds :-)))

:-( Second try: 
Well, this gives me the right object, but it isn't rendered. As
I reviewed the list archive, I found out, that this seems to be
normal. Maybe somebody can explain why, if he/she has 
some sparetime.

:-( Third try:  
Wow, it works! But, as the smiley implies, it has its disadvantages:
Using it in SubFolder2 gives again an infinite recursion.
Find out for yourselves, why ;-))

:-) Fourth try: 
or: 
if you want to use the method of a subfolder.
That seems to be the right way. Any comments?

After the second try (my first serious one ;-) I tried the following:


   


but this has the disadvantage, that standard_html_header uses the namespace
of PARENTS[-1] to display things like id or title.

Maybe this should go into the FAQ?

Happy zoping,
Michael

===
Michael Gutmann M.A.| 
Universitaetsrechenzentrum  | 
Heinrich-Heine-Universitaet Duesseldorf | 
Tel.  : +49 211 81-11969|
e-mail: [EMAIL PROTECTED]  | This space is intentionally
http://gutmann.rz.uni-duesseldorf.de/   | left blank.
===

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