It's better when it's simple

User Tools

Site Tools


mediamanager.php template file

The media manager's functionality has changed drastically since the last major release of DokuWiki; however, the code in the background is only slightly different, and requires that you use CSS or table based layout.

Minimum Requirements


For minimum functionality, you'll need to use a tag with an id of media__manager encapsulating an empty <div> tag pair with an id of media__opts.

Finally, you'll need to call tpl_mediaTree() in order to display the tree, and tpl_mediaContent() to display the files to select from.

A simple example:

<div id="media__manager" class="dokuwiki">
    <?php html_msgarea() ?>
    <h1><?php echo hsc($lang['mediaselect'])?></h1>
    <?php /* keep the id! additional elements are inserted via JS here */?>
    <div id="media__opts"></div>
    <?php tpl_mediaTree() ?>
    <?php tpl_mediaContent() ?>

Look and Feel

All style information for media manager is in the standard location for stylesheets, with the prefix of media__; copy those into your own stylesheets and you should be fine.

Of course for customization purposes you may wish to modify the default styles.

Sample Code

See for the current default implementation in the 'dokuwiki' template at lib/tpl/dokuwiki/mediamanager.php.

See also

devel/templates/mediamanager.php.txt · Last modified: 2014-02-06 13:59 by Klap-in

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki