DEPRECATION WARNING

This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.

Configuration

Manage providers

Providers are managed via TypoScript in plugin.tx_mediaoembed.settings.providers.

There are two ways of configuring matching URLs of an provider: regular expressions or simple wildcard based schmemes.

Regular Expressions

To make the handling of URLs simpler we use # as the regex delimer.

This is an example configuration using Regular Expressions:

plugin.tx_mediaoembed.settings.providers {
    some_provider {
        endpoint = https://some-provider.tld/oembed/endpoint
        urlRegexes {
            10 = #https?://([a-z0-9-]+\.)?myprovider\.(org|de|dk)/embedvideo/.*#i
            20 = #https?://([a-z0-9-]+\.)?myprovider\.(org|de|dk)/embedimage/.*#i
        }
    }
}

Wildcards

A simpler approach is the usage of wildcards. In that case the config option is called urlSchemes and not urlRegexes:

plugin.tx_mediaoembed.settings.providers {
    some_provider {
        endpoint = https://some-provider.tld/oembed/endpoint
        urlSchemes {
            10 = https://*.myprovider.org/embedvideo/*
            20 = https://*.myprovider.org/embedimage/*
        }
    }
}

It provides less flexibility than regex but it is easier to handle.

Rendering

The Extension uses the default Extbase template mechanisms for rendering.

This means you can add your own template and partials paths to the configuration to overwrite the templates that come with this Extension:

plugin.tx_mediaoembed {
    view {
        templateRootPaths {
            0 = EXT:mediaoembed/Resources/Private/Templates/
            1 = EXT:mysitepackage/Resources/Private/Templates/
        }
        partialRootPaths {
            0 = EXT:mediaoembed/Resources/Private/Partials/
            1 = EXT:mysitepackage/Resources/Private/Partials/
        }
    }
}

See also: view