Quantcast
Channel:
Viewing all articles
Browse latest Browse all 17

Comment on Retrieving Role Information in your Orchard View Templates by Sipke Schoorstra

$
0
0
Nice little post! We need more of them. Regarding output caching, the code in the view will not render when that's enabled, unless you tweak the output caching module to vary by user role. Any reason that you're not using the dot notation syntax to get the first name? E.g.: var currentUser = (dynamic)WorkContext.CurrentUser.ContentItem; var firstName = currentUser.ProfilePart.FirstName.Value; I'm assuming that the user has a ProfilePart, this of course needs to be replaced with the actual part name that holds the FirstName field.

Viewing all articles
Browse latest Browse all 17

Trending Articles