diff --git a/demo-shell/src/app.config.json b/demo-shell/src/app.config.json index 83080386de..ac2a175541 100644 --- a/demo-shell/src/app.config.json +++ b/demo-shell/src/app.config.json @@ -600,7 +600,7 @@ "content-metadata": { "presets": { "default": { - "exif:exif": "*" + "exif:exif": "*" } } }, diff --git a/docs/content-services/components/content-metadata-card.component.md b/docs/content-services/components/content-metadata-card.component.md index 9d4c5f239a..830900e10b 100644 --- a/docs/content-services/components/content-metadata-card.component.md +++ b/docs/content-services/components/content-metadata-card.component.md @@ -130,8 +130,7 @@ A final example shows the same process applied to a custom preset called "kitten ### Layout oriented config You can also go beyond the aspect oriented configuration if you need to configure the groups and properties in a more detailed way. With this type of configuration any property of any aspect/type -can be "cherry picked" and grouped into an accordion drawer, along with a translatable title -defined in the preset configuration. +can be "cherry picked" and grouped into an accordion drawer, along with a translatable title defined in the preset configuration. #### Basic elements @@ -217,6 +216,80 @@ The result of this config would be two accordion groups with the following prope | kitten:favourite-food | | kitten:recommended-food | + +### Displaying all properties + +You can list all the properties by simply adding the `includeAll: boolean` to your config. This config will display all the aspects and properties available for that specific file. + +```json +"content-metadata": { + "presets": { + "default": { + "includeAll": true + } + } +}, +``` + +Futhermore, you can also exclude specific aspects by adding the `exclude` property. It can be either a string if it's only one aspect or an array if you want to exclude multiple aspects at once: + +```json +"content-metadata": { + "presets": { + "default": { + "includeAll": true, + "exclude": "exif:exif" + } + } +}, +``` + +```json +"content-metadata": { + "presets": { + "default": { + "includeAll": true, + "exclude": ["exif:exif", "owner:parameters"] + } + } +}, +``` + +When using this configuration you can still whitelist aspects and properties as you desire. Let's see more complex examples for each of the config layouts: + +##### Aspect oriented config +```json +"content-metadata": { + "presets": { + "default": { + "includeAll": true, + "exclude": "exif:exif", + "exif:exif": [ "exif:pixelXDimension", "exif:pixelYDimension"] + } + } +}, +``` + +##### Layout oriented config +```json +"content-metadata": { + "presets": { + "robot-images": [ + { + "includeAll": true, + "exclude": ["cm:content", "exif:exif"] + }, + { + "title": "Robot Group", + "items": [ + { "aspect": "exif:exif", "properties": [ "exif:pixelXDimension", "exif:pixelYDimension"] } + ] + } + ] + } +}, +``` + ## What happens when there is a whitelisted aspect in the config but the given node doesn't relate to that aspect Nothing - since this aspect is not related to the node, it will simply be ignored and not diff --git a/lib/content-services/content-metadata/components/content-metadata/content-metadata.component.html b/lib/content-services/content-metadata/components/content-metadata/content-metadata.component.html index 996ea9f747..e1c344b2c9 100644 --- a/lib/content-services/content-metadata/components/content-metadata/content-metadata.component.html +++ b/lib/content-services/content-metadata/components/content-metadata/content-metadata.component.html @@ -21,7 +21,7 @@