Put all umbraco data types into a folder under Data Types #13054
Replies: 6 comments 6 replies
-
You could write a notification handler for DataTypeSaving where you can move the data type into the the appropriate folder if it isn't where you want it. https://our.umbraco.com/documentation/Reference/Notifications/DataTypeService-Notifications/ |
Beta Was this translation helpful? Give feedback.
-
I love this idea, actually. The data type folder can become a somewhat untamed beast if you neglect it for just a second. Even having them 'grouped' by their base implementation would make them more manageable |
Beta Was this translation helpful? Give feedback.
-
And I still remember when you couldn't use folders...! A folder called "Custom" and then sub folders by type is an implementation I've seen and used myself a lot. But I've also seen a folder called the name of the project instead of "Custom". It's definitely subjective. So just thinking about why I like to put in a 'custom' folder... Two reasons I think: If you've ever inherited a site and all the data types are in the root then your heart sinks, it takes more mental effort to work out what has been added for this site. So when I expand the data types folder to find the one I want to edit, or the place to add one, it's never in the root! It would be much better to move those core ones 'out the way'! So I think @simonbusborg 's and @seanrockster suggestion of having those predefined/core/default datatypes created in their own folder makes a lot of sense and gets my 👍 And has the benefit that data types created whilst working on doc types being put in the root then isn't a problem. Then people can implement whatever folder structure they like, or just create all their data types in the root. Unless of course this makes it discoverability of data type configuration harder for people new to Umbraco of course |
Beta Was this translation helpful? Give feedback.
-
Or better yet, when creating a new type, prompt the user to save the new type to a specific folder, otherwise it goes to the root. |
Beta Was this translation helpful? Give feedback.
-
Think this is also tied to the add property/datatype workflow, it's far too easy to create 10's of datatypes that should just reuse a single existing one with the current journey (esp when in an infinite editor scenario). Perhaps a confirmation prompt, are you sure you want to create this new datatype, or reuse one of the same type and list them? Agree with @Bakersbakebread Some clients like all datatypes of the same type to exist in a type folder, seems a relatively straight forward config option? Also means they see immediately the create vs reuse issue above! Also lots of times we don't actually need all the OOTB dataypes for a project, install step/flag to don't add any? (similar to choosing /adding a starter kit). Infact could datatypes/mediatypes be repurposed to a starter kit? |
Beta Was this translation helpful? Give feedback.
-
One of the first things I do in a new installation now is to create a "Standard" folder under DataTypes and move all the Umbraco default ones there😁 I mostly want the Standard ones segregated so I don't edit or delete them. |
Beta Was this translation helpful? Give feedback.
-
e.g. Data Types > Umbraco (all umbraco base data types)
We organise our data types into subfolders however the standard data types are all under the root. Not a major issue however when creating new types via document types, they get dropped into the root. If the standard types are segregated into their own folder its easier to spot the ones we've created.
Alternatively, have a way to move multiple types, because moving them one by one is painful.
Beta Was this translation helpful? Give feedback.
All reactions