This project is read-only.

Token for User Content Type fields

Topics: Core, Customizing Orchard, General, Writing themes
Mar 1, 2015 at 1:05 AM
Hey guys,

In my project, the User content type has the default fields ( UserName and Email) plus some custom ones. Specifically, users have First Name, Last Name, and seeing as User can be containable, it also has data for which container content type the user belongs to. In my application, these are: organizations, teams and schools.

Question: in pages visible only to authenticated users, how can I access these user token to use in my markup?

I want to say something like: Hello {User.FirstName}, you are now part of {User.ContainerPart}!

Ideally outputs something like: Hello John, you are now part of Team Awesome!
Mar 1, 2015 at 1:06 AM
I should add, I haven't found much documentation on how to use tokens outside of the workflow context.
Mar 1, 2015 at 1:27 AM
Actaally, I should first ask, are tokens usable from within pages, or just workflows?

Can I use token syntax from within a body part of my pages?
Mar 2, 2015 at 7:05 AM
Enable Tokens Html Filter feature
Mar 6, 2015 at 7:29 PM
Brilliant, thanks jersiovic!