2 votes

Document Type Picker for v7

The Document Type Picker package allows editors to choose a list of Document Types to be saved against a content page. This could be used for things like site map exclusions or navigation lists. The current version of this package is only compatible with version 7 of Umbraco.

If you'd like to contribute to the package, please visit https://bitbucket.org/rbdigital/umbraco-documenttype-picker, fork the repository and send a pull request.

Set Up

Create a new data type using the RB.DocumentTypePicker property editor. Add a new property to a document type using the new data type you have just created. Once you have created your new property, you should be able to choose from a list of current document types present within your Umbraco solution.

Converter

When using a property value on a template, add the following code to return and use a list of document type aliases.

@{
    IEnumerable<string> documentTypes = CurrentPage.GetPropertyValue<IEnumerable<string>>("alias");
}

Once converted, you will be able to select or loop through each document type. For example:

@{
    // Loop through each alias
    foreach (var documentType in documentTypes)
    {
        @documentType;
    }
}

Screenshots

Package owner

RB

RB

RB has 150 karma points

Package Compatibility

This package is compatible with the following versions as reported by community members who have downloaded this package:
Untested or doesn't work on Umbraco Cloud
Version 8.18.x (untested)

You must login before you can report on package compatibility.

Previously reported to work on versions: 7.7.x

Package Information

  • Package owner: RB
  • Contributors: Dan Lister
  • Created: 25/06/2014
  • Current version 1.0.0
  • License MIT
  • Downloads on Our: 773