Developer forum

Forum » CMS - Standard features » Usermanagement tags

Usermanagement tags

Martin Gammelholm
Reply

Hey,

We've created a customfield for users, and now we want to use this tag around our website, but discovers that it isn't available as a global tag. The solution is not up to date, so my question is: Has user customfields been implemented as global tags in latest release?

 

BR
Martin


 

 

 

 

 


Replies

 
Nicolai Høeg Pedersen
Reply

They are not available

 

In Razor you can access them using

Dynamicweb.Modules.UserManagement.User.Current(PagePermissionLevels.Frontend).CustomFieldValues

 

BR Nicolai

 
Mikkel Ricky
Reply

Damn, Nicolai beat me to it, but here's the wiki page for future reference: https://github.com/dynamicweb/razor/wiki/Users.

 

 

 

 
Martin Gammelholm
Reply

Thanks for the fast replies! ;)

 
Paul Sørensen
Reply

The thing is the site is running 8.2.3.10 with DW solution set, so that option is not possible.

Our use case is that we need to hide prices for users belonging to specific group in the ERP system.
I have made a custom field on the user, which hold the int value 0 or 1, determining wether to show or hide the prices.

This is working in the product view, but has to be consistent in all the steps of the shop. Product list, product view, basket, checkout, receipt and mail receipt. So, if user.customfield("DoNotShowPrice") == 1, hide prices for the user in all steps of the shop.

 



 

 

 

 

You must be logged in to post in the forum