current user node ID and object ID in full view template

current user node ID and object ID in full view template

Tuesday 07 September 2004 9:16:08 am - 3 replies

Author Message

Georg Franz

Tuesday 07 September 2004 9:32:59 am

Hi Eivind,

did you initialize the var $current_user?

It's only available by default in the pagelayout.tpl, not in other templates!

So, if you use it in other templates you have to do something like this before:

{default current_user=fetch('user','current_user') }

... 

{/default}

Best wishes,
Georg.

--
http://www.schicksal.com Horoskop website which uses eZ Publish since 2004

Eivind Marienborg

Tuesday 07 September 2004 9:40:24 am

Works great, thanks! :D

Lazaro Ferreira

Tuesday 07 September 2004 10:02:41 am

Hi,

Have you tried fetching it before :

{let current_user=fetch('user','current_user') }
current_user <br />{$current_user|attribute(show)}
{/let}

it shows every bit of current_user info, including node and object id

Lazaro Ferreira
http://www.mzbusiness.com

Lazaro
http://www.mzbusiness.com

You must be logged in to post messages in this topic!

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.