Assigning Media Sources to TVs
Last updated Oct 20th, 2026 | Page history | Improve this page | Report an issue
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$194 per month—let's make that $500!
Learn moreCreate the source first: Adding a Media Source.
Which TVs Use Sources¶
Only TVs with the image or the file input type open the file browser of a source. The other input types store a plain value.
The manipulatable_url_tv_output_types setting holds a separate list of TV types. When such a TV is rendered on a page, its value gets the baseUrl of the source in front of it. The list defaults to image,file.
Assigning a Source to a TV¶
Create the TV first, then save it. The edit page of the TV has a Media Sources tab. It lists the Contexts of the installation and the source assigned to each of them.
A TV can use a different source in every Context. The source of the Context that the Resource belongs to is the one that opens.
- Create a TV called
TestSourceTVand save it. - Open the Media Sources tab and assign the source to the Contexts you need.
- Set the input type of the TV to
imageon the Options tab. - Assign the TV to a Template and save.
Limiting a Source to a Folder¶
A source usually points at one directory, so that the users of the TV pick files from that directory and nowhere else. Set it on the source itself:
- Create the source under Media → Media Sources.
- Open the source for editing.
- Set the properties:
| Property | Value |
|---|---|
basePath |
assets/images/ |
baseUrl |
assets/images/ |
Leave basePathRelative and baseUrlRelative on. They are on by default, and they tell MODX that the path and the address are relative to the install directory.
Write the path without a leading slash and with a trailing one MODX does not check either end of the value, and a path that starts with a slash is no longer relative to the install directory.
Editing the TV¶
Open the TV in a Resource and the source shows up in the field:

Opening the list loads the MODX.Browser window with the source you assigned. The browser shows the contents of assets/ and nothing else.
Access to the source decides who may use it. See Securing a Media Source for the rules.
See Also¶
- Media Sources
- Adding a Media Source
- Assigning Media Sources to TVs
- Securing a Media Source
- Media Source Types
- Extending Media Sources
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$194 per month—let's make that $500!
Learn more










