The Metadata Plugin
Metadata Management for Manila
 
Site last updated
2/24/2006; 12:33:21 PM
 
Home

Why

Features

FAQ

Updates

Documentation

Download

Developers

Bugs

Feedback

Discuss

Planned
Features

 
 

Managing Meta Types

(Note: this page applies to version 5.x. For version 4.x documentation, see Managing Meta Types (v4.x)).

OK, you've downloaded the Metadata Plugin. You've installed it. You've enabled it. You've thought long and hard about your data model. Now you're ready to get started!

Log in as an editor of your site. Look for the metaData link in your Editors-only menu:

Editor Bar Screenshot: The Editors-only menu.

When you click it, you'll be taken to the Manage Meta Types page. This is the administration page for the Metadata Plugin.

Manage Meta Types v5 Screenshot: Managing Meta Types

First, a general principle: you make changes in the form, then you click the Update button. You can make as many changes as you like. When you're ready, click the Update button and your changes will be implemented.

Let's go through the interface. Each meta type you define has one line containing the following elements:

  • Delete. To delete a meta type, check the box next to the meta type you want to delete and click Update. Poof! You've deleted it. (Technical note: this deletes the meta type from the meta types table, but does not delete the corresponding index or the metainformation already stored for this type in the message table.)
  • Field Order. You can click the arrows in this column to change the order in which metadata fields are presented to the user in Manila's Edit This Page form. (Unless you're an advanced user and are using Custom Input Form Templates.)
  • Meta Type. The name of the meta type. If the meta type is a built-in meta type, it appears in green. A built-in meta type is a meta type that is part of Manila's stock configuration, such as member. More information on built-in meta types is available here. Valid names for meta types are made up of letters, numbers, and underscores.
  • Enabled. You can have meta types defined but not enabled. Only enabled meta types are included in the <HEAD> element of pages, and only input fields for enabled meta types appear when you are creating or editing a Manila object, such as Stories.
  • Applies To. Some meta types are appropriate for Pictures (called images here), others only for Stories/Messages (called pages), others for both.
  • Indexing Method.

    Indexed. Choose an option other than None here if you want the Metadata Plugin to index the contents you enter for this particular meta type. For example, suppose I have a website where I'm reviewing books, chapter by chapter. I have a meta type called ISBN that I fill with the ISBN number of the book I'm reviewing each time I create a new web page. Now I've got 44 web pages referring to that ISBN number. How do I find all of them quickly? Good thing I set Indexed to Yes when I created this meta type...now all I have to do in order to see all the pages for this particular book is use the query() macro like this: {metaDataMacros.query("ISBN", "1861002777")}.

    Now for the tough part. Which indexing method is appropriate for your meta type? If your meta type will be storing dates or integers, that's easy: just choose the Date or Integer indexing method.

    If your meta type is a boolean (maybe you want to assign Yes or No to a meta type called isInteresting) you would choose the Boolean indexing method.

    Now let's go through the various text indexing methods. Let's use an example. Suppose we're going to enter the following text in a metadata field called Color:

    blue, yellowish green

    One way to index this entry would be to break it up using commas as a delimiter. Thus the entry "blue, yellowish green" becomes two separate items in the index. In version 5, this is referred to as List Whole Text indexing. It's called List because the entry is really a list of two elements. It's called Whole Text because the text in each element is not broken up ("yellowish green" is a single entry, not two entries).

    What if you want to index all the individual words? We called this Text indexing in version 4, but the term is rather ambiguous. It's now called Full Text indexing. "blue, yellowish green" becomes three items if indexed using Full Text Indexing. Full text indexing also strips out junk words like the so your index doesn't bloat up.

    Whole Text indexing just grabs the whole chunk, without paying attention to any delimiters. Thus, "blue, yellowish green" is just one index entry.

    This table should summarize the differences:
    List Whole TextFull TextWhole Text
    Index
    Entries
    • 'blue'
    • 'yellowish green'
    • 'blue'
    • 'yellowish'
    • 'green'
    • 'blue, yellowish green'

    At this point your eyes have glazed over and you're probably asleep. Why should you even care about indexing methods? The answer is simple. It affects what you can search for. Look at the table above. Suppose you want to search for all web pages where the Color meta type contains the color green. If you used the Whole Text indexing method, you'd come up empty; the only thing we've got indexed using Whole Text is yellowish green, not green.

    It is your responsibility to make sure that you're using the correct indexing method for your meta type. Don't try to index a field full of dates using Full Text indexing, for example!

  • Value List. Each meta type may have a value list associated with it. For example, boolean meta types have the values true and false associated with them. Maybe you want to create a recipe website with three sections, Soups, Pies, and Vegetables. You want your users to pick one of the three sections when they enter a new recipe. Easy: add the values Soups, Pies, and Vegetables to the value list for your Section meta type. You can also change the order of items in a value list but at this point that has no effect anywhere else (such as the ordering of a dropbox input field).
  • Include in HEAD. If you choose Yes, your metadata will be included as META tags in the HEAD element of your Manila web pages. Yes is the default. You might want to choose No if the field is for your own private use...to organize your site, for example.
  • Changes Refresh Input Form. For advanced users only; default is No. A change of metadata value for a meta type will cause the form to refresh rather than post when you hit the Post Changes button when editing a page. David Bayly: With the introduction of the foreach capability in Custom Input Form Templates, it is possible to create message editing forms whose form elements will change depending on metadata value of the message being edited. So for example, the form seen when creating a new story might contain a multibox field whose values "turns on" a number of other fields. To edit the added fields, the form must be refreshed, which is 2 step process - submit the new story form then, click edit this page for the resulting story display. The intermediate step can be avoided by setting the refresh attribute on the multibox field. You are effectively saying "refresh the form when this value changes or is created."
  • Who may Edit?. This applies security to the meta type. Fields may be edited by any member with rights to edit a page (members), contributing and managing editors (editors) or by managing editors only (m-editors).
  • Field Format. Typing in metainformation is a pain. If you have a regular set of values that you use, why not just select them from a dropbox? Set the field format to dropbox and the next time you create or edit a story, you'll get a dropbox to choose from. What if you want to add a value that isn't listed in the dropbox? Easy. Select the "Other" item from the dropbox and you will be prompted to enter the value. You must have JavaScript enabled for this feature to work. If you do not want to include the "Other" item in your dropbox, choose dropbox limited. Boolean (a radio-button choice between Yes and No) and radio field (a radio-button choice between all meta values for a meta type) formats are also available. You can change field formats at any time. Often the best approach is to start with the field format set to textbox, then after you've entered some values, switch to dropbox. Another option is multibox, which is basically like a dropbox but you can select multiple values. Advanced users may wish to check out Custom Field Formats.
  • Default Value. If you choose to put a value here, it will be pre-entered in the metadata field when you create a story. You can even put a macro here.
  • New Meta Type. To create a new meta type, enter the name of the meta type and click Update. Then you can set the rest of the options for your new meta type. Names of meta types may include lower and upper ASCII characters and underscores. No spaces or special characters, please.

Technical note: if you have access to the Frontier server and you wish to change the default size of the text input boxes in the above interface, change the values at metaDataSuite.metaTypes.dsp_inputwidth and metaDataSuite.metaTypes.dsp_defvalwidth.

Options

Under Options at the bottom of the page there are several additional features.

  • Enable full-text indexing of Subject and Body is a shortcut to enable full-text indexing for your Manila site. If you choose this option, there will be a pause while the plugin indexes everything, and two builtin meta types (body and subject) will be added. To see how to set up a search form to search through your newly indexed content, see the full-text indexing section of the metaSearchForm documentation.
  • Query Builder is basically a graphical front end to the query macro that allows you to quickly get the query you want interactively; a syntactically correct query macro is presented to you along with the results of your query, and you can just copy and paste into your pages. See the query macro documentation.
  • Change Plugin Behavior lets you change various preferences for how the plugin does things. For example, you can specify how default metadata values are used. Click this option on your Manage Meta Types page to get more information.
  • Clear Macro Cache allows you to clear the cache that the Metadata Plugin uses to speed up metadata operations. The Metadata Plugin clears the cache automatically when necessary, so you should never need to do this unless you've made changes behind the scenes (i.e., not through a browser). It also lists the number of currently cached items.
  • Add Dublin Core. Click the question mark to find out more (you'll be taken to this page).

There you have it. You can now create and delete meta types and control various aspects of them. Of course, the most important thing is still your data model.

You might also want to read about a common scenario for using the Metadata Plugin.

If you have questions, post them in the discussion group.

Comments...


This page last updated Wednesday, October 22, 2003 at 9:09:10 AM. (13330)