Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Wildcards


Reply

5 Posts   539 Views

Avatar
oerm4411

16 May 2011 at 9:17am Community Member, 14 Posts

This may have been answered before, but I don't see it when I do a search. Are there any wildcards for users' names? I'd like to have my site say "Welcome back XXXX" when they login, preferably using a user's first name.

Avatar
swaiba

16 May 2011 at 9:33am Forum Moderator, 1796 Posts

wildcards?

you can use ss templating functions like...

<% control CurrentMember %>{$FirstName}<% end_control %>

Avatar
oerm4411

16 May 2011 at 9:37am Community Member, 14 Posts

How do I embed that code in the welcome page? Do I simply insert that in the page editor or in the HTML?

Avatar
swaiba

16 May 2011 at 9:43am Forum Moderator, 1796 Posts

You'd put that in the template....
http://doc.silverstripe.org/sapphire/en/tutorials/1-building-a-basic-site#templates

Avatar
oerm4411

18 May 2011 at 12:56pm Community Member, 14 Posts

Thank you Swaiba!