[Zope] Newbie Questions (or maybe not... ;-)

Ze Octavio joc@hiper.com.br
Wed, 02 Feb 2000 10:31:17 -0200


Hi Chris,

> I'm hoping these both have simple answers. Firstly, is there any way you can
> make component DTML methods such as standard_html_header (and maybe other
> objects) invisible to the outside world?

You can use the Zope Security's to limit that. Every object have the
Security's tab, you can then choose what role can do what.

> It's messy (and possibly a security hazard!) if they're not, for example, take a
> look at http://www.zope.org/standard_html_footer. This isn't really the sort of
> thing you want visible on its own but what if that method actually did something
> like delete files/etc...

If all pages of your site will make a reference to the
standard_html_header, I think is better you do not delete anything from
it. =]

> Secondly, is there any way you can specify a parent object of the same name in a
> DTML method?
> What I want to do is build up standard_html_header as you get deeper into a
> directory structure, for example:
> 
> in / standard_html_header is:
> <HTML><HEAD><TITLE><!--#var title_or_id--></TITLE></HEAD><BODY
> BGCOLOR="#FFFFFF">
> 
> in /dir1 standard_html_header is:
> <dtml-var standard_html_header>
> Some more text for a header...
> 
> and so on...

One way to do that is:

<dtml-with "PARENTS[1]">
   <dtml-var standard_html_header>
</dtml-with>
 
best regards,

-- 
Ze Octavio
--
Hiperlógica <http://hiper.com.br>
Automação de web-sites | Web-site automation
São Paulo | Brasil | Fone: +55-11-8168067