Timeline for How to tell Drupal to look for templates in module directory?
Current License: CC BY-SA 3.0
11 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 9, 2012 at 1:01 | history | edited | avpaderno♦ | CC BY-SA 3.0 |
added the relevant code
|
Mar 28, 2012 at 11:17 | comment | added | Countzero | OK. Seems like I learned something today. | |
Mar 28, 2012 at 10:34 | history | bounty ended | jcisio | ||
Mar 28, 2012 at 10:34 | vote | accept | jcisio | ||
Mar 28, 2012 at 10:33 | vote | accept | jcisio | ||
Mar 28, 2012 at 10:34 | |||||
Mar 28, 2012 at 10:16 | comment | added | jcisio | @Countzero when you declare a theme node_attach, then all hook_preprocess_node functions won't happen with your new theme. I.e. you don't have anything in your node-attach.tpl.php. | |
Mar 23, 2012 at 9:03 | comment | added | Countzero |
This doesn't seem true : theme calls are cumulative so implementing hook_theme should give you the $existing parameter which lets you modify the thing, not overriding it. If it's not the case then perhaps you're hitting a bug.
|
|
Mar 20, 2012 at 9:38 | comment | added | jcisio | I don't want to define a theme. If you define your theme 'mynode' instead of reusing 'node', you don't have any variable in your .tpl.php file. | |
Mar 19, 2012 at 2:22 | comment | added | paul-m | The way you define a theme is... with hook_theme(). :-) You can define theming functions in hook_theme(). Name them anything you want. Make shim functions if you want. API docs: "hook_theme_HOOK() ...should only be used if a module needs to override or add to the theme preprocessing for a theme hook it didn't define." | |
Mar 18, 2012 at 21:56 | comment | added | jcisio | As I said in the question, I don't want to use hook_theme() because I want to reuse $variables in the node template. Those variables are generated in hook_(pre)process of many modules who don't know the existence of my theme (if I define one). | |
Mar 18, 2012 at 19:40 | history | answered | paul-m | CC BY-SA 3.0 |