Monday 04 October 2004 10:47:17 am
Hello! I've just had the need to do a similar thing, and managed to get the node_id of an object I was editing. I was creating a class override template for edit.tpl and found out that in edit templates you can get the node_id using this variable: $object.main_node_id
If you need other node info, like url_alias, for instance, you can access them like this: $object.main_node.url_alias
If you want a list of all node info you can access in edit templates, just temporarily insert this in your template to read the output: {$object|attribute(show)}
If you scroll through the output, you'll get a line that says 'main_node_id' and has the wanted node_id value. The lines immediately after that one start with a '>' and list several attributes: those are all the attributes that you can access using: $object.main_node.[insert listed attribute name here]
Hope this can help you (if you still need it). Antonio
|