I've been searching for a while now, even here, but none of the questions get answered. Is or is it not possible to add a property to a user? If not, what would be a good workaround?
For example, I want my LinkedIn and other socials and/or a short "about me" shown under my posts.
I suppose I wasn't clear. Let me try to rephrase it.
On the frontend there are blog posts, let's call them blogs. These blog posts are written by users (note: with this I mean the Umbraco term of an User.)
On the blog post will be a portion of information of said user. Like their socials and biography. This specific information is often configured under said user but not for Umbraco.
So, the question is: how to/best practice to store user specific information for use on the frontend?
When I've had this scenario in the past, I've created an Author Document Type, that details the Author's name and linked in and biog, as when you think about it, it's kind of like content, just not necessarily a webpage - although often I will create an Author page template, to show the details about the Author, and list their recent blog posts.
Then I'll add a content picker to the blog post that allows single (or sometimes multiple) authors to be picked for a blog.
Then in the template for the blog post, I'll use this 'picked' author to retrieve the Author details to display under the Blog Post.
If the Authors aren't going to have their own page, then I might create a section of the site called 'Library' or 'Shared Content' and have an Authors Folder and allow the creation of Authors under there, ready to be picked.
If you are worried about Users logging in, writing some tosh and assigning it to another Author - then you could make the Author property a label and write some code using the EditorModel sending events, to find the Author that matched the current logged in User and populate it automatically... but usually it's more useful to let people pick the Author from the list, for those niche circumstances when someone is away on holiday...
v12 Add Custom Property to user
Hi there,
I've been searching for a while now, even here, but none of the questions get answered. Is or is it not possible to add a property to a user? If not, what would be a good workaround?
For example, I want my LinkedIn and other socials and/or a short "about me" shown under my posts.
Hopefully this will be seen and answered.
Kinds regards, Eddie
Do you mean backoffice users or frontend members?
AFAIK backoffice users can not have custom properties.
Backend users.
And what would you suggest I do?
I'm not aware of anyway to do this.
Why would you want to show this info to backoffice users?
I suppose I wasn't clear. Let me try to rephrase it.
On the frontend there are blog posts, let's call them blogs. These blog posts are written by users (note: with this I mean the Umbraco term of an User.)
On the blog post will be a portion of information of said user. Like their socials and biography. This specific information is often configured under said user but not for Umbraco.
So, the question is: how to/best practice to store user specific information for use on the frontend?
Hi EddieDemon
When I've had this scenario in the past, I've created an Author Document Type, that details the Author's name and linked in and biog, as when you think about it, it's kind of like content, just not necessarily a webpage - although often I will create an Author page template, to show the details about the Author, and list their recent blog posts.
Then I'll add a content picker to the blog post that allows single (or sometimes multiple) authors to be picked for a blog.
Then in the template for the blog post, I'll use this 'picked' author to retrieve the Author details to display under the Blog Post.
If the Authors aren't going to have their own page, then I might create a section of the site called 'Library' or 'Shared Content' and have an Authors Folder and allow the creation of Authors under there, ready to be picked.
If you are worried about Users logging in, writing some tosh and assigning it to another Author - then you could make the Author property a label and write some code using the EditorModel sending events, to find the Author that matched the current logged in User and populate it automatically... but usually it's more useful to let people pick the Author from the list, for those niche circumstances when someone is away on holiday...
regards
marc
is working on a reply...