Michel Pelletier wrote:
Mauricio wrote:
Arnaud Lecat wrote:
Hi
I've tried document_id... it returns the name of the method which is called in the header of my document. This method is used to make a navigation bar ok ? So I get every document in a folder and like to get the id of the current one to make its name appears in bold in the menu...
Here's my code for sidebar... a little bit porky piece of code. I someone could upgrade it, it would be welcomed :)
Okay...i had this problem too, and i looked in the source code of the Zope(that's great! Open Source it!) and i found a method that returns it's own id, the method is "this()"...so, i hope i have helped you and sorry my bad english.. @:O)
This actually returns the object itself. For example:
<dtml-with this> <p>Now the top item of the namespace stack is the equivalent to the python convention of 'self'. 'this' by name or "this()" in an expression, if called in a DTML method, 'this' will return the container of the method. </dtml-with>
-Michel
Much better... The to get the id, use this().id @:O) -- Mauricio Souza Lima <mauricio@hiper.com.br> Hiperlógica <http://hiper.com.br> Automação de web-sites | Website automation São Paulo | Brasil | Fone: +55-11-251-4894