0

I want to introduce a custom theme function in my theme. Typically, I would register a theme in hook_theme() in a module, but I want to define this function from my theme (Omega 4). In whatever module I'm in, I'd like to just build my render array and let it be themed by the theme-side theme function.

Example:

$ra = array(
    '#theme' => 'my_theme_fx',
    '#somevar' => 'foo',
    '#anothervar' => 'bar'
);
0

The description of hook_theme() is:

Register a module (or theme's) theme implementations.

So you can implement this hook in your theme.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.