Thanks Demian,

I tried {$user.firstname} based on the {$profile.firstname} example.  How does one know when to use “->” and when to use “.”? 


I have been looking at Smarty and PHP tutorials, and there are lots of examples of both “.” and “->”, but I can’t find any explanations.



From: Demian Katz []
Sent: Friday, October 12, 2012 7:35 AM
To: Karla Smith;
Subject: RE: Username display on more than profile page?


When a user is logged in, the object representing their account is available to all templates as $user.  That's probably the easiest way to customize the display.  You could try something like:

{if $user}{$user->firstname|escape} {$user->lastname|escape}{/if}

(the "if $user" probably isn't necessary, but I'm just being extra careful).

- Demian

From: Karla Smith []
Sent: Thursday, October 11, 2012 6:17 PM
Subject: [VuFind-Tech] Username display on more than profile page?


I would like to display the patron name at the top of their list of checkouts (and maybe on other MyResearch pages).  So far, no luck.

I thought maybe since {$profile.firstname|trim|escape} displayed it on profile.tpl, I could use that.   Nope.

I thought that maybe there’d be something in Profile.php that I could copy and use in CheckoutOut.php to assign the variable there, but I didn’t see anything that looked promising.


Any suggestions?




Karla Smith, ILS Manager

Winnefox Library System

Oshkosh, WI 54904

~If Truth is Beauty, how come no one has their hair done in the library? – Lily Tomlin


This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.