Media API
Display mode: list
Show
show
| Tag | Description |
|---|---|
| __name__ |
The name given to the record |
| __filename__ | The filename |
| __id__ | The internal ID number given to the item |
| __image__ | A thumbnail version of the image (if an image, duh) |
Parameters
howmany
Sets the maximum number of items to display
Example:
"howmany:3",
order
Sets sort order of items in list. By default will show the oldest items first.
| item | description |
|---|---|
| recent | by date, starting with most recent |
| random | returns a random list |
| title | by title, in alphabetical order |
type
Sets which types of files to display.
| item | description |
|---|---|
| image | jpg,gif,png,bmp |
| audio | mp3,wav,aiff |
| video | wmv,mpeg,mp4,mpg,mov,avi,m4v,flv |
| document | All other file types are labeled document |
Display mode: detail
Show
show
| Tag | Description |
|---|---|
| __imageurl__ |
url to the image |
| __title__ | title of the image |
Parameters
label:header
Grabs the header image for records that support header images (pages, blogs, etc.)
Examples
getContent(
"media",
"display:list",
"type:image",
"howmany:10",
"order:random",
"show:__name__ -- __filename__<br>"
);
getContent(
"media",
"display:detail",
"find:".$_GET['nav'],
"label:header",
"show:<img src="__imageurl__" alt="__name__" id="subpage_header" />"
);