Rendering a value differently on the CMS frontend than how it is stored
Hey all,
first time posting on the forums...
On my site when a member asks a question the member's id is stored (as a "textstring" datatype) with the question to show who asked it. This is what I want but the only problem is when an admin user views the question in the umbraco CMS the user appears as an id. While this is correct, it isn't very user friendly.
I was wondering is there some way of taking the member's id just before the question page loads in the CMS and render the field with the Member's name instead (which I can get using new Member(id).getProperty("name")....etc)? Maybe some sort of event I could use? I don't want to change how the value is stored, just how it is displayed for this particular page in the CMS.
There's a member picker data type that ships with Umbraco, that should do what you require. Otherwise you will need to write your own data type. Then you control the functionality of what (and how) the data is rendered.
Thanks slace. Someone had suggested to me already the custom datatype approach but I just wanted to make sure it wasn't the only way of doing it. I hadn't thought of the member picker approach so that will come in handy down the line. For this one though I think the custom datatype is the preferred route.
Rendering a value differently on the CMS frontend than how it is stored
Hey all,
first time posting on the forums...
On my site when a member asks a question the member's id is stored (as a "textstring" datatype) with the question to show who asked it. This is what I want but the only problem is when an admin user views the question in the umbraco CMS the user appears as an id. While this is correct, it isn't very user friendly.
I was wondering is there some way of taking the member's id just before the question page loads in the CMS and render the field with the Member's name instead (which I can get using new Member(id).getProperty("name")....etc)? Maybe some sort of event I could use? I don't want to change how the value is stored, just how it is displayed for this particular page in the CMS.
Thanks for your help,
Pat :-)
There's a member picker data type that ships with Umbraco, that should do what you require. Otherwise you will need to write your own data type. Then you control the functionality of what (and how) the data is rendered.
Thanks slace. Someone had suggested to me already the custom datatype approach but I just wanted to make sure it wasn't the only way of doing it. I hadn't thought of the member picker approach so that will come in handy down the line. For this one though I think the custom datatype is the preferred route.
Thanks
is working on a reply...