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:
- Go to the admin section of EnterMedia and select the catalog you would like to modify properties for.
- 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:
- Go to the property editor, and add a new property called "Department"
- Check the Index, Stored, and Editable checkboxes so that we can search by department and the data is stored on
disk.
- The department is going to be a list of departments, so I set the "View Type" to "List" and then click the
"Save" button.

- 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.
- Go to the admin section of EnterMedia and select the catalog you would like to modify views for.
- 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.
- Media Viewer Dialog - The mediaviewerdialog is a lightweight viewer designed to show only basic asset information. It is not not meant to be a full featured data editor, but you are free to customize it to your liking.
- Media Viewer - The mediaviewer is the same as the mediaviewerdialog except that it is used when a user is entering from outside of the site, i.e. they were sent a link to an asset from a friend.
- Detail Viewer - The detailviewer is a full featured data editor, allowing the user to edit all meta-data associated with an asset, as well as edit multiple assets at the same time.
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.
- WEB-INF/base/themes/darktabs/entermedia/layouts/mediaviewer.html - main UI for all of the different media viewers.
- WEB-INF/base/entermedia/catalog/mediaviewer/types/*.html - Media Viewer, Media Viewer Dialog - add views after assetinfo.html is included. Assetinfo.html may be included
in the main mediaviewer.html page or in a page for the specific type, i.e. video.html would define the media
viewer for videos.
- WEB-INF/base/entermedia/catalog/detailviewer/index.html - Detail Viewer - add views after the other views in detailviewer/generalinformation/index.html
To display a view we recommend you use the display macro. The display macro takes four arguments:
- filename - HTML file used to display the data. The different choices are in the detailviewer folder.
- readonly.html - displays the meta-data as a read-only list
- generic.html - displays the meta-data with a header and gives the user an option to edit the meta-data.
- assetid - ID of asset's meta-data to display
- view - data view you want to display. You can edit or create your own view using the view editor.
- print - is used if the page will be printed out. It formats the data in a printer friendly way.
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.
- 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)
- 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."
- 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>"
- Create the lists file
- 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.
- 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>
- Add the list to the details view - Now that the property has been created we need to add it to the details
view.
- 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."
- Manually editing the file - Add the following to
/catalog/configuration/views/asset/details.xml:
< property id="season"> Season< /property>
- 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