Custom placement of embedded Docs Viewer

In the pre-2.0 Docs Viewer, I was able to customize the placement of the embedded Docs Viewer with something like:

$docsViewer = new DocsViewerPlugin;

In 2.0, it seems like $docsViewer->docsViewer() should work, but it does not.

How can I do this in Omeka 2.0?

Thanks - Erin

You should be able to do it without the new DocsViewerPlugin, by just calling $this->docsViewer($files) (it takes the file or files to display as an argument).

The new docs viewer creates a Zend-style view helper, so you can use it pretty much anywhere in any view by calling $this->docsViewer().

Fatal Error: Using $this when not in object context

(PS: can you recommend any especially useful Zend resources?)

It seems the issue was that I was calling from a function in custom.php. How can I get around this limitation?


This was very helpful! Yes, I was able to put
<?php echo $this->docsViewer($files) ?>
in items/show.php as desired to place my embedded DocsViewer near the top of the page instead of the bottom (the default).

However, please note you also have to go to the DocsViewer plugin settings and uncheck the box for "Embed viewer in public item show pages?"

Before I did that, my viewer was showing up twice.