I want to create objects in umbraco like for a member profile, I want members to be able to add an Experience object that consists of:
Description : string
Date: DateTime
Company : string
Current : boolean
Now I would want a member to enter as much experience items as possible, so it will be a list of Experience. How would I create this in umbraco mvc? I am struggling to get to grips with this at the moment.
Thanks for the reply. What I was looking for is a way to add properties to the Member object like you mention. For simple properties like strings or datetime properties, can easily create those but for more complex objects like lists of custom data types, can you advise me on how to add these to umbraco?
I think you must create a custom property editor with angularJS and then you can add this custom property editor as datatype and use this for a new property in your member type.
I just want to add that if the current property editors is not enough for you to achieve what you need you can create your own as well. The AngularJS workbook is a good place to start learning about that https://github.com/umbraco/AngularWorkbook
And in general http://umbraco.tv might be useful as well for a general introduction and education in how Umbraco works and what you can do.
Create custom data types
Hi,
I want to create objects in umbraco like for a member profile, I want members to be able to add an Experience object that consists of:
Description : string
Date: DateTime
Company : string
Current : boolean
Now I would want a member to enter as much experience items as possible, so it will be a list of Experience. How would I create this in umbraco mvc? I am struggling to get to grips with this at the moment.
Thanks a lot for all the help
Hi mohammed,
you can add custom properties to your member type in member section. It's the same procedure as you add properties to a document type.
If you create a partial view macro file in developer section, you can use a default snippet for register members and edit member profiles to do this.
Hope this helps,
Best Sören
Hi Sören,
Thanks for the reply. What I was looking for is a way to add properties to the Member object like you mention. For simple properties like strings or datetime properties, can easily create those but for more complex objects like lists of custom data types, can you advise me on how to add these to umbraco?
thank you
Hi mohammed,
I think you must create a custom property editor with angularJS and then you can add this custom property editor as datatype and use this for a new property in your member type.
This is a good starting point for this:
https://our.umbraco.org/documentation/Extending-Umbraco/Property-Editors/creating-tutorial1-v7
Best,
Sören
Hi Mohammed
I just want to add that if the current property editors is not enough for you to achieve what you need you can create your own as well. The AngularJS workbook is a good place to start learning about that https://github.com/umbraco/AngularWorkbook
And in general http://umbraco.tv might be useful as well for a general introduction and education in how Umbraco works and what you can do.
Hope this helps.
/Jan
Thanks a lot guys, im going to look into AngularJS.
Thanks a lot
Hi Mohammed
You're welcome - If you have further questions or stumble upon something you can't figure out then you know where to ask :)
/Jan
is working on a reply...