I’m trying to insert addtional informations on the items/browse page (just under
So, I wonder if there’s a way to override the default view template in a view event.
The code below doesn’t work :
$view = $event->getTarget();
$model = new ViewModel();
Any idea ?
Am I understanding right that you’re trying to use a module to swap out the template being used? What event are you trying to listen to for this? I would suspect that the Omeka-provided “view.” events wouldn’t work, since they’re all triggered within the view files themselves, so if they are triggered then we’ve already started rendering that view with the original template… though maybe you could make that work if you rendered to the “current” view model instead of a new one.
Instead of doing this, you might try listening to the Zend-provided “render” event… you could attach right before the default listener there and just change the template in the view model at that point, just before the actual rendering starts.
This topic was automatically closed 250 days after the last reply. New replies are no longer allowed.