Closed (fixed)
Project:
Content Templates (Contemplate)
Version:
5.x-1.1
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
26 Feb 2007 at 01:41 UTC
Updated:
28 May 2008 at 15:31 UTC
I want to only display a cck field if the user is NOT anonymous..
I tried using $user->uid directly in my custom template 'node-events.tpl.php' for my 'events' custom content type but that did NOT work.
i've tried passing $user->uid into my cck custom template 'node-events.tpl.php' using _phptemplate_variables and that did NOT work either:
function _phptemplate_variables($hook, $vars) {
switch ($hook) {
case 'events':
$vars['user'] = $user->uid;
break;
}
return $vars;
}
how can i access the uid of teh current user from withIN a cck content template (via contemplate or tpl.php file)..
thanks much
Comments
Comment #1
ghankstef commentedTry this
Comment #2
jrglasgow commenteddid this take care of your problem?
Comment #3
newdru commentedyes
Comment #4
jrglasgow commentedComment #5
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.