Closed HefinJ closed 7 years ago
Hey @HefinJ,
You define your own fieldsets, so you should know the type of properties contained within by their name?
The best practice for using Archetype is to split the rendering of each fieldset type into separate partial views (e.g. named by fieldset alias), and render the entire Archetype by looping over the fieldsets and call the appropriate partial views.
Check this page for more on rendering.
Hi @kjac,
I'm not rendering in this case.
I'm using an Upload field within an Archetype - but using an Upload field in an Archetype results in orphaned media items on the file system if an editor deletes a content page.
So to overcome this I've hooked into the Content EmptyingRecycleBin and Deleting Events so I can first look for any entities that have a property of type Archetype, and then within that Archetype property I want to identify which properties are of type Upload - so I can manually delete the media item - this way I can make sure there are no orphaned media items on the File System. But because the property data of an Archetype is null (or most of it) - I can't identify which properties are of type Upload.
Hope that makes sense :-)
@HefinJ is this issue still relevant?
I'm closing this issue now.
If you loop through the properties of an Archetype, like this:
The only property data that is not null is the Alias and the Value of the property - it is impossible to identify what the property data type is, as the information is null.