I am wondering what is the best way to store a list of entities in Umbraco.
Say, I have a page that list a bunch of contact information (name, company address, phone number, etc...). I want a web administrator to be able to easily create and edit them inside Umbraco.
Should I be creating a new Data Type call Contact. And have those properties in that Data Type?
If so, is this a good practice? I always think each node in Umbraco is suppose to be a page.
If not, what other options do I have?
Thank you,
Chi
Each node in Umbraco does not necessarily have to be a page. You can have child nodes (not pages) which constitute a list to be displayed on their parent node (a page).
For example: you could have a document type called ContactList. The corresponding template will look for all child nodes having the document type Contact and list them. The Contact document type has all the properties you need for a contact. You do not need to assign a template to the Contact document type (or a NullTemplate, displaying nothing).
Advantages of using nodes for each contact:
Of course, there are limits. For example, if you have more than 40-50 contacts, this will be difficult to use. Or if you have to regularly import or synchronize contacts, some additional programming effort will be required.