Skip to content

An Umbraco property editor that uses document types for content blocks.

License

Notifications You must be signed in to change notification settings

vokseverk/umbraco-embedded-content

Repository files navigation

Umbraco Embedded Content

NuGet release Our Umbraco project page

An Umbraco property editor that uses document types for content blocks.

Demo

Note: Embedded Content works with Umbraco 7.6.0 and newer

Installation

The preferred way to install Embedded Content is through NuGet

Option 1: NuGet

Embedded Content is available as a NuGet package.

To install run the following command in the Package Manager Console

PM> Install-Package DisPlay.Umbraco.EmbeddedContent

Option 2: Our Umbraco

Embedded Content is available as a package on Our Umbraco

Usage

For now look at the sample project in samples/Website

Label resolvers

Out of the box the following property editors have custom label resolvers:

Property editor alias Displayed value
Umbraco.MultipleMediaPicker Comma separated list of media names
Umbraco.MediaPicker2 Comma separated list of media names
Umbraco.MultiNodeTreePicker Comma separated list of entity names
Umbraco.MultiNodeTreePicker2 Comma separated list of entity names
Umbraco.TinyMCEv3 Text without HTML
UmbracoForms.FormPicker Form name
RJP.MultiUrlPicker Comma separated list of link names

Property editors without a label resolver shows the raw value.

Creating a custom label resolver

angular.module('umbraco')
.run(['DisPlay.Umbraco.EmbeddedContent.LabelResolvers', 'formResource', (labelResolvers, formResource) => {
  labelResolvers['UmbracoForms.FormPicker'] = (property, cacheService) => {
    const fromCache = cacheService.getOrAdd('UmbracoForms.FormPicker', property.value, () => {
      return formResource.getByGuid(property.value);
    });

    return fromCache ? fromCache.data.name : null;
  }
}]);

Contributing

Anyone can help make this project better - check out our Contributing guide

Authors

License

Copyright © 2016 DIS/PLAY A/S

Embedded Content is released under the MIT License