I'm looking for a better understanding on when/why/how to use document type compositions. Any advice, best practices or tips would be good.
My senario:
I have created a base document type with umbracoSettings and seo properties which can be made use of when creating a document type composition. This is similar to the inheriting document type work flow.
All sites have default images rendered, adding a media picker property to the base would cover this. But i'm not sure if i should add it to the base document type or create a single document type with only and media picker ?
thanks for your advice, i am doing as you suggest and separating properties.
as an exmaple, one scenario is images for different circumstances. ie small medium and large. Would i create one document type with three media pickers labeled as required or three separate document types one for each size ?
I could use Image Cropper, but the uploaded images to the cropper are not viewable in Back Office media folder. I would like to give a more visual experience to the site content editor to see what they have in the media folder when adding and removing images.
The current version of Umbraco (7.5.4) the default backing type is no longer the upload control but the imageCropper control. So if you add crops to the generic image cropper type in the data types you will have your 3 crops.
If you are on an earlier version of umbraco that is still using the upload control you can change the backing control from the upload control to an imageCropper control in the Setting-> Media Types->Image->Upload image.
But just note that by doing this every image in your media library will have these crops.
This will let you have crops and all the goodness of the media library.
Although the original issue was different, I'd just like to say I've been struggling with this cropper / picker issue too. You can either have an image cropper with one or multiple crops (but can't see the uploaded image in Media and/or select one from there) or replace the image upload control with an image cropper control and have ALL images in media have crops.
Both options are bad, IMHO. There's a third option, creating a custom media type using a cropper and a media picker datatype to go with it, which is equally bad but for different reasons - for instance, if you want to get that right, you must also create folders accepting only your new media type and have the image picker use such a folder as root. Okay, but you can't create a package with this stuff since you either have to include the whole Media section or nothing at all.
I think a hybrid approach would be better - haven't found any plugin that does that so far.
DocType Compositions advice
Dear Umbraco Team
I'm looking for a better understanding on when/why/how to use document type compositions. Any advice, best practices or tips would be good.
My senario: I have created a base document type with umbracoSettings and seo properties which can be made use of when creating a document type composition. This is similar to the inheriting document type work flow.
All sites have default images rendered, adding a media picker property to the base would cover this. But i'm not sure if i should add it to the base document type or create a single document type with only and media picker ?
Thanks Dibs
Hi Dibs,
The best way to understand Compositions is to seperate properties into a container that can be used over different types of other Document Types.
Like you said, for SEO purposes you can create an composition doctype called _SEO which includes properties like Page Title, Meta Description, ...
But you can easily add many other compositions.
We sometimes create a _Settings composition type which has properties like Hide from sitemap or other settings.
So just go ahead check which properties can be seperated to be used across other document types.
Hope this helps.
/Michaël
Hi Michael
thanks for your advice, i am doing as you suggest and separating properties.
as an exmaple, one scenario is images for different circumstances. ie small medium and large. Would i create one document type with three media pickers labeled as required or three separate document types one for each size ?
Thanks Dibs
Yo only need to create one which is of type Image Cropper. There you can setup multiple crops for an image and only need to create one property!
Have a look at the docs:
https://our.umbraco.org/documentation/getting-started/backoffice/property-editors/built-in-property-editors/image-cropper
/Michaël
Thanks Michael
I could use Image Cropper, but the uploaded images to the cropper are not viewable in Back Office media folder. I would like to give a more visual experience to the site content editor to see what they have in the media folder when adding and removing images.
Thanks Dibs
Hey Michaël
The current version of Umbraco (7.5.4) the default backing type is no longer the upload control but the imageCropper control. So if you add crops to the generic image cropper type in the data types you will have your 3 crops.
If you are on an earlier version of umbraco that is still using the upload control you can change the backing control from the upload control to an imageCropper control in the Setting-> Media Types->Image->Upload image.
But just note that by doing this every image in your media library will have these crops.
This will let you have crops and all the goodness of the media library.
Geoff
Although the original issue was different, I'd just like to say I've been struggling with this cropper / picker issue too. You can either have an image cropper with one or multiple crops (but can't see the uploaded image in Media and/or select one from there) or replace the image upload control with an image cropper control and have ALL images in media have crops.
Both options are bad, IMHO. There's a third option, creating a custom media type using a cropper and a media picker datatype to go with it, which is equally bad but for different reasons - for instance, if you want to get that right, you must also create folders accepting only your new media type and have the image picker use such a folder as root. Okay, but you can't create a package with this stuff since you either have to include the whole Media section or nothing at all.
I think a hybrid approach would be better - haven't found any plugin that does that so far.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.