Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Dibs 202 posts 991 karma points
    Nov 03, 2016 @ 11:45
    Dibs
    0

    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

  • Michaël Vanbrabandt 863 posts 3348 karma points c-trib
    Nov 03, 2016 @ 13:33
    Michaël Vanbrabandt
    0

    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

  • Dibs 202 posts 991 karma points
    Nov 03, 2016 @ 15:17
    Dibs
    0

    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

  • Michaël Vanbrabandt 863 posts 3348 karma points c-trib
    Nov 03, 2016 @ 15:42
    Michaël Vanbrabandt
    1

    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

  • Dibs 202 posts 991 karma points
    Nov 04, 2016 @ 10:16
    Dibs
    0

    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

  • Geoffry Brown 8 posts 79 karma points
    Nov 07, 2016 @ 01:06
    Geoffry Brown
    0

    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

  • Sotiris Filippidis 286 posts 1501 karma points
    Nov 07, 2016 @ 13:14
    Sotiris Filippidis
    0

    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.

Please Sign in or register to post replies

Write your reply to:

Draft