Timeline for Display text according to the access to a field
Current License: CC BY-SA 3.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Feb 25, 2016 at 5:29 | comment | added | Suresh R |
I think the problem comes from there only :P, you should put the hook in your module and not the theme's template.php. AFAIK you can use hooks in template.php that are only meant for themes. If at all you wanna check if the hook is called in template.php just put print_r and exit without any conditions. If you don't have custom modules and want to implement from theme only, then you can go for'template_preprocess_node . Refer api.drupal.org/api/drupal/modules%21node%21node.module/function/…
|
|
Feb 24, 2016 at 16:40 | comment | added | Hgfdsoiu |
I have clear the cache, but it does not work. I tried print_r() , but there also, nothing displays. Would not you rather use hook_node_view_alter() ? For information, I put this function in my template.php, but I do not think the problem comes from there.
|
|
Feb 24, 2016 at 4:33 | comment | added | Suresh R | Did you clear the cache? replace MODULE_NAME with your module name. Try to put print_r to check if the condition passes. | |
Feb 23, 2016 at 13:39 | comment | added | Hgfdsoiu | i try the first code with drupal message and it does'nt work. | |
Feb 23, 2016 at 12:34 | comment | added | Suresh R | I think you can follow the normal way of adding markup in t(). Something like t('!para_start your text !para_end', array('!para_start' => '<p>', '!para_end' => '</p>'));, but am not so sure if it is the right way. Just give it try | |
Feb 23, 2016 at 12:11 | comment | added | Hgfdsoiu | Thanks Suresh. I thought of the drupal message, but I prefer one <p>. You know how can it be done? I had also thought of using a field to show the message, but my tries did not work. | |
Feb 23, 2016 at 12:08 | history | answered | Suresh R | CC BY-SA 3.0 |