Forums / Setup & design / Access User variable from within content

Access User variable from within content

Author Message

ola adigun

Wednesday 31 January 2007 3:07:56 pm

is there an easy way to access current user id / name from within an article for example?
I can do so within template using something like: {$user.contentobject.name}. How can I access this or something equivalent within an article?

thanks.

Ɓukasz Serwatka

Thursday 01 February 2007 12:08:58 am

You can get owner information like:

{$node.object.owner.name} where "owner" is ezcontentobject. You can inspect it like:

{$node.object.owner|attribute(show,1)}

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

ola adigun

Thursday 01 February 2007 7:59:11 am

When I do this: {$node.object.owner.name} directly inside the body of an article it just prints it back. I guess that only works within a template. What I need is a way to access that same information within the body of an article content.

Thanks,
Ola