Chapter 6 : Customize Meta-Data Screens

Adding Properties to Assets

Asset properties are editable using the Property Editor. To get to the property editor do the following:

  1. Go to the admin section of EnterMedia and select the catalog you would like to modify properties for.
  2. Click on the Fields tab and then select "Edit Properties" for the "asset" search type.

In the Property Editor you can create a new property or edit existing properties. To edit an existing property, you can use the "Edit Details" link located in the far right column. If you want to create a new property, enter the new properties label in the "Label" textbox and click the "Save New" button. Once you create a new property you can configure it using it's "Edit Details" link. For an example, I would like to add a new department field to my assets. To do that I would do the following:
  1. Go to the property editor, and add a new property called "Department"
  2. Check the Index, Stored, and Editable checkboxes so that we can search by department and the data is stored on disk.
  3. The department is going to be a list of departments, so I set the "View Type" to "List" and then click the "Save" button.
  4. To add departments to the department property click on the "list" link, when you are finished editing the list the new property is complete.

Editing Views

All of the asset properties in EnterMedia reside in Views. To edit an existing view or to create a new view we need to go to View Editor which is accessed from the Catalog Manager.
  1. Go to the admin section of EnterMedia and select the catalog you would like to modify views for.
  2. Click on the Fields tab and then select "Edit Views" for the "asset" search type.

You are now in the view editor, from here you can create a new view or edit an existing view. Each of the existing views has a usage label which lists where the view is used in EnterMedia. To edit an existing view click on its View Id, to create a new View use the Add button at the bottom of the page.

When editing an existing view you will be presented with a list of properties that will be displayed with the view, the label that will be displayed on the user interface, and links to edit or remove a property. You can edit each property by clicking on its Id or by clicking on the edit link, to change the label in the user interface simply edit the Label text and click Save. To add a new property simply select the new property from the "Add New Property" dropdown and click Add.

Once you have your views configured the way that you would like, it is time to add the view to one of the viewers or verify that your changes to an existing view are displayed properly.



Editing Properties and Views by Hand

All of the views and properties are stored as XML files. If you would like to edit the properties and views by hand, use the following files:

Editing Properties:
  • /WEB-INF/base/entermedia/catalog/configuration/*properties.xml - where * is the name of the data table's properties you would like to edit. So, if I want to edit asset properties, I would edit /WEB-INF/base/entermedia/catalog/configuration/assetproperties.xml. To that file I would add my new property enclosed in property tags.
  • /WEB-INF/base/entermedia/catalog/configuration/lists - This directory contains XML files that that define the possible values a list property can have. So, if I want to edit the possible departments available, I would edit /WEB-INF/base/entermedia/catalog/configuration/lists/departments.xml.
Editing Views:
  • /WEB-INF/base/entermedia/catalog/configuration/views/{datatable}/*.xml - where * is the name of the view. So, if I would like to add a property to the details view of the asset data table , I would edit /WEB-INF/base/entermedia/catalog/configuration/views/asset/details.xml

Media Viewer vs Media Viewer Dialog vs Detail Editor

Before you begin adding your new view to EnterMedia it is important to know the difference between the different viewers/editors available. Each of the following viewers/editors consists of a directory in the catalog folder and possibly some files in the entermedia/layouts directory.

Change HTML by Media Type

Each media type has their own viewer page, which allows you to maintain different sets of meta-data for different types of assets. First, you need to locate the HTML page for the type of asset you want to modify meta-data for.

To display a view we recommend you use the display macro. The display macro takes four arguments:

Example

For this example, I'm going to add a new list property to a photo asset's details view. Then, I'm going to add the details view to the media viewer. The list property will be named "Season" and will be used for photos to note what season the photo was taken in.

  1. Create new list property
    • Since I'm adding properties to asset views we need to create the new properties in /WEB-INF/base/entermedia/catalog/configuration/assetproperties.xml. I can use either the visual editor, manually edit the file, or setup a fallback for the configuration directory. (For more information on creating fallbacks see Chapter LOOK THIS UP)
      1. Using the visual editor - Navigate to the property editor for the photo catalog asset data table. Enter the name of our new list in the Label text box and click "Save New." Then, edit the details of our new property by clicking on "Edit Details."
      2. Manually editing the file - edit /catalog/configuration/assetproperties.xml, add the following line to the file: "< property id=" season" catalogid=" media/browse/photo" index=" true" stored=" true" editable=" true" viewtype=" list" searchtype=" asset" listid=" seasons" > Season </property>"
  2. Create the lists file
    1. Using the visual editor - Click on the list link next to the property, use the "Add New Record" link to add new values to the season list.
    2. Manually editing the file - Add the following to the file /catalog/configuration/lists/seasons.xml:

      <?xml version="1.0" encoding="UTF-8"?>

      < seasonss>
      < seasons id="1"> Spring< /seasons>
      < seasons id="2"> Summer< /seasons>
      < seasons id="3"> Fall< /seasons>
      < seasons id="4"> Winter< /seasons>
      < /seasonss>

  3. Add the list to the details view - Now that the property has been created we need to add it to the details view.
    1. Using the visual editor - Navigate to the view editor for the photo catalog asset data table. Click on the details view, select our new season property, and finally click "Add."
    2. Manually editing the file - Add the following to /catalog/configuration/views/asset/details.xml:
      < property id="season"> Season< /property>
  4. Add the details view to the media viewer

For an example, lets say that I want to add the details view to the Media Viewer as a read-only list of properties. I find where assetinfo.html is included and insert the a call to the display macro, so the code looks like so:



Which yields the following results:



Last Updated: Tue Oct 27 12:20:53 EDT 2009