0

I'm really pulling my hair out about this one and wonder if someone can help?

Is it possible to override a module's output from the theme's template.php file? Basically, I wan't to modify the output of the Geolocation Module without updating the module output itself.

if so, how would I go about it?

thanks a lot

Dave

1 Answer 1

0

Your question is somewhat vague, what specifically is the "output" you want to override?! Is it drupal Field output, a theme variable such as $vars['geolocation-something-foo'] ... or something else?

There is likely a preprocess or process Hook you can implement to slide in your changes. Or using Devel Themer you can probably override their template file with one of your own easily.

Something I did yesterday was override the implementing function of another module with a (local copy) of my own version of that function in a custom module -- tweaked to add HTML attributes and tags that I needed and were'nt provided by the raw HTML (non render array) output of the other module.

I followed the good example from this Snugug: Overriding Drupal Theme Functions from your Module and used HOOK_theme_registry_alter() using the following logic:

/** * Implements hook_theme_registry_alter */ function mymodule__theme_registry_alter(&$theme_registry) { $theme_registry['ORIGINALMODULE_function_name']['function'] = 'MYMODULE_function_name'; } 

I think took the body from the original function, copied, tweaked and pasted it into mymodule_function_name. I believe this hook is callable from a theme as well ...

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.