Nadav Samet schrieb:
> I'd like the master to know somehow which template is extending him so it
> can highlight the right item in the navigation bar.
> How can this be achieved?

You can request the filename of that template like this:

<body py:match="item.tag == '{http://www.w3.org/1999/xhtml}body'">
     <p>Current template: <b py:content="self.module.__file__" /></p>
</body>

Another trick is to pass information via the attributes of the body tag 
in the template. I.e. in your template you write something like this:

<body menu="xyz">
     ...
</body>

And then in the layout you do:

<body py:match="item.tag == '{http://www.w3.org/1999/xhtml}body'">
     <p>Menu selected: <b py:content="item.get('menu')"/></p>
</body>

Hope that helps.

-- Christoph

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
kid-template-discuss mailing list
kid-template-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kid-template-discuss

Reply via email to