Administrator

How do I create searchable metadata tag fields?

Follow
Ryan Richins
  • Agilix team member

As you build curriculum, it is important to ensure you and other course authors can find it quickly and easily. One way to do that is to tag content and activities with metadata that you can use when searching your library.

Create searchable metadata fields

First, you need to set up metadata fields for each domain and subdomain. Once created, these fields appear as either text-entry or dropdown search filters in the Digital Library when you select the domain as the desired Collection.

Create searchable metadata fields

To add metadata fields, you have to create an XML document with the filename _Default.xml. You can model your document after the example below; this list describes the major components:

  • Open and close your field list with <itemmetadata> and </itemmetadata> tags.
  • Open and close each metadata field that you create with <Value> and </Value> tags.
  • Each field requires the following values:
    • id: This value is used in the search. It must be alphanumeric, only, and begin with "meta-".
    • display: This value acts as the field's title in the Digital Library.
    • inputtype: This value indicates whether this field is a:
      • Text-entry box, in which case you don't need to provide any additional information. See the meta-keyword entry in the example below.
      • Dropdown menu, in which case you need to provide the choices that should populate the menu, as in the meta-gradelevel example. For each choice, provide the:
        • value: The alphanumeric only value that is used in the search.
        • display: The value displayed in the dropdown.
<itemmetadata>
  <value id="meta-keyword" display="Keyword" inputtype="Text" />
  <value id="meta-gradelevel" display="Grade Level" inputtype="Choice">
   <choice value="PreK12" display="Pre-K12" />
	<choice value="Kindergarten" display="Kindergarten" />
	<choice value="Grade1" display="Grade 1" />
	<choice value="Grade2" display="Grade 2" />
	<choice value="Grade3" display="Grade 3" />
	<choice value="Grade4" display="Grade 4" />
	<choice value="Grade5" display="Grade 5" />
	<choice value="Grade6" display="Grade 6" />
	<choice value="Grade7" display="Grade 7" />
	<choice value="Grade8" display="Grade 8" />
	<choice value="Grade9" display="Grade 9" />
	<choice value="Grade10" display="Grade 10" />
	<choice value="Grade11" display="Grade 11" />
	<choice value="Grade12" display="Grade 12" />
	<choice value="Undergraduate" display="Undergraduate" />
	<choice value="Graduate" display="Graduate" />
	<choice value="CorporateTraining" display="Corporate Training" />
	<choice value="ProfessionalStudies" display="Professional Studies" />
	<choice value="Other" display="Other" />
  </value>
</itemmetadata>

When you're done, upload the XML file to course resources in the following location: Resources/searchForms/ItemMetaData

Tag content and activities

To tag content and activities, you have to create metadata fields that you want attached to items (folders and activities), and content authors can use them to specify tags as they build.

Create metadata fields

To create metadata fields:

  1. Open Settings from the Domain tool toolbar and select Course Options.
  2. Click Add in the Activity Metadata section, and then click the pencil (edit) icon in the row that appears.
Create metadata fields
  1. Provide:
    • A Name, which is not visible to the users and cannot include spaces or special characters (you can underscore or hyphenate between words).
    • A Title, which is visible to students.
  2. Choose Input Type from the options listed here. The content entered in these fields is used to create searchable metadata tags, so it's important to be deliberate about the following options:
    • Boolean, which provides content authors with a checkbox, so they can make basic "on/off" or "true/false" choices.
    • Choice, which provides content authors with a predefined list of alphanumeric tag options in a dropdown. When selecting this type, click Add Choice to create dropdown options.
    • Float, which provides content authors with a range of numbers in a dropdown that can include decimals. Use the Min and Max fields to create the desired number range.
    • Integer, which provides content authors with a range of numbers in a dropdown without decimals. Use the Min and Max fields to create the desired number range.
    • Rich Text provides content authors with a rich text editor that supports text styles and images; however, this content is not searchable, so this input type can't be used to create searchable metadata tags.
    • String, which allows content authors to enter terms and phrases that will be made searchable.
  3. Use the Default field to define the default state or content that you want present in the field (this is not available for the Rich Text input type).
  4. Indicate the Levels within the course folder structure at which you want this metadata displayed. Level one is the first level of folders under the course folder, level two impacts any folders or activities you add to those folders, and so forth. If you don't specify here, the field is shown at all levels.
  5. Choose the Item Type for which the section should appear (folders, activities, or all).
  6. Indicate whether you want to Allow setting per group.
  7. Indicate whether you want to make the item Visible to students when they select the item in the Activities tool (only applicable to folders).
  8. Save.

Add searchable tags to items

You can use the Admin app to add tags to folders and activities once the fields are created:

  1. Open the Courses tool using the Main Menu.
  2. Select the Course ID for the desired course.
  3. Click Syllabus in the toolbar to open the Editor tool for the course.
Add searchable tags to items
  1. Create a new folder or activity, or click the pencil (edit) icon to add tags to existing items.
  2. Select the Data tab in the activity editor.
  3. Find the metadata field you created, and enter or select the searchable tag.
  4. Save.

Comments (2)

Sort by
Matthew Marichiba

Thanks for this. Few questions:

1. How can we create a consistent metadata grammar across a hierarchy of domains? Do subdomains inherit searchable metadata items from their parent, or is there another mechanism?

2. Could you give an example of the `putitems` command based on the grade-levels metadata example above? Say, a new folder tagged for Grade 10, and a new item tagged with keyword "Pluto". Concrete examples are helpful. 

3. Aside from `putitems`, can searchable metadata be applied to course entities as well? If so, I presume it's `createcourses` and `updatecourse` to add metadata to a course?

Ryan Richins
  • Agilix team member

Hi Matthew, 

Excellent questions. We've updated this article to reflect the answers where necessary. 

  1. The XML file needs to be uploaded to each domain and subdomain in order to generate the fields in the library. 
  2. We've added examples and corrected an error in the description of the [NEWDATA] field.
  3. UpdateCourses can be used to update metadata on Courses (https://api.agilixbuzz.com/js/docs/#!/Concept/FreeFormXml).

Let us know if you have any further questions or need more information. 

 

Please sign in to leave a comment.