Overide core helper in theme

I want to override the flash.php helper so that I can change how it appears on my site.

I want to change the id and layout etc.

Im presuming its fairly easy to create my own helper flash.php for the template, but how do I get Omeka to use mine instead of the main helper.

Is there any documentation on this? I couldnt find anything so apologies if I just missed it.

Do you want to do this on the admin side of the site, or for a public theme? (I'm guessing admin side, since public themes usually don't use flash(), but thought I'd double-check, as the approach will differ)

Hi its in a public theme, im modifying an existing theme (scribe) and this seems to be used to show error and user notifications 'succesfully logged in' etc.

In the code its just echo flash()

Which outputs a div with id="flash" and an unordered list.

If theres a better/proper way to modify the notification service so I can wrap it in my own div with a different class and remove the list that would be handy.

Incidently im rebuilding the theme using bootstrap hence why I want to change the class to do it the bootstrap way rather than just create a 'flash' class.

Ah, that makes sense. I wasn't aware that scribe uses it. So, if you only need this in your customized public theme you can take a quick-and-easy approach, rather than writing a plugin.

1. Copy the Flash.php file from the application/views/helpers directory and put it wherever you like in your theme's directory. Make any modifications to that file.

2. Somewhere in your theme's common/header.php file, add this:

<?php $this->addHelperPath(PUBLIC_THEME_DIR . '/scribe', 'Omeka_View_Helper_' ); ?>

The first parameter is just the path to the directory where your new Flash.php is, so adjust as needed.

That should make flash() work anywhere in your public theme with your changes, but will leave behavior on the admin side unchanged.

hope that helps

Star, thought there might be a simple way to do this :-D