MTMediaManagerItems

A container tag representing a list of Media Manager entries. The actual list can be configured using the optional attributes to this tag. The default is to display all entries. To alter this behavior, you can provide one of several attributes to filter the results.

Attributes

catalog

Restricts the result set by the corresponding Amazon Search Index or “Catalog.” The default is “all.”

Possible Values: ”all | Books | DVD | VHS | Electronics | Video | VideoGames | Music | MusicTracks | Kitchen | Classical | Software”

lastn

Display the last N entries (according to sortorder and sortby below), where N is some number greater than 0.

offset

Specifies the number of records to offset the beginning of the list by, then displays the remaining entries (or the next n entries if used in combination with lastn). For example, the following tag will display entries 6-10 (inclusively):

  <MTMediaManagerItems lastn="5" offset="5">
  ...
  </MTMediaManagerItems>

status

Limit entries displayed to those with the given status. Valid values are unread, reading and read. If no status attribute is given, entries are displayed regardless of status.

isbn

Limit entries displayed to those with a matching ISBN. Cannot be used with the entry_id attribute.

entry_id

Limit entries displayed to those with an associated blog entry id matching entry_id. Cannot be used with the isbn attribute.

sort_order

Specifies the sort order for this particular tag. Valid values are ascend and descend. The default value is descend.

Possible values: “ascend|descend”

sort_by

Specifies the field by which to sort. Valid values are status, isbn, entryid, modifiedon, finishedon and enteredon. You can specify an arbitrary sort order for your entries by overriding the ”last modified on” field in the Media Manager interface and sorting by modifiedon. If you sort by entryid, entries without an associated blog entry id will be skipped. The default value is entered_on (the date on which the entry was originally entered).

Example

Attributes of MTMediaManagerItems can be combined in arbitrary ways. For example, the following tag will take all entries with status set to ”unread”, sort them in ascending order according to the last modified date and display items 11 through 20 (inclusive) of that set.

<MTMediaManagerItems lastn="10" offset="10" 
    status="unread" sort_order="ascend" 
    sort_by="modified_on">
 ...
</MTMediaManagerItems>

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

About Majordojo

"Majordojo" is the name under which Byrne Reese releases the software he writes. Byrne Reese is a father, a product engineer, an open source hacker and an employee of Six Apart.

 Subscribe to this site's feed

View Byrne Reese's profile on LinkedIn

Recent Comments