The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
29 views

hook to redirect user before they create node?

I'm running a db_query to check if the user has taken a specific action. If they haven't, I'm redirecting them to the page where they can take that action. function my_special_module_node_view(...) { ...
0
votes
0answers
39 views

node_view not returning body markup

I have several custom node modules and which are creating their own types. When I perform a node_load and node_view locally, all the content of the node is there. However, when moving to a ...
0
votes
1answer
76 views

How to hide a form field in hook_node_view()

function hook_node_view($node, $view_mode, $langcode) { // How can I hide a field in the hook_node_view() using $node // In my case the field is an image file field }
2
votes
1answer
30 views

Add aditional field with title to every node

I am trying to add additional field to nodes. I could add the field but I can't find a way to add its title. I have implemented the hook_node_view . My code is function cso_node_view($node, ...
0
votes
1answer
197 views

Which are the differences between hook_node_view_alter and hook_preprocess_node?

I have to remove some elements from a node before show it, but I can't understand where it's better to put the code. Mainly I can't understand the differences between hook_node_view_alter and ...
1
vote
2answers
116 views

Trouble adding markup in a node with hook_node_view()

I'm trying to add a piece of markup with a field in hook_node_view(). It's a little thumb icon for a music site, and I want to overlay this image over another field image (which I'll do with CSS). ...
0
votes
0answers
65 views

How to display variable_get in node_view

I have a node_view function which calls hide() on a few fields if the current user isn't associated with the node. I also have an admin page which sets a WYSIWYG variable. Whenever I hide these ...
1
vote
4answers
134 views

How do I hide title of a node?

I have tried doing this in hook_node_view or hook_node_view_alter with no luck: I have tried things like: unset( $node->title); or $node->title =''; note: my node was created using ...
0
votes
0answers
74 views

Override contributed module output (inline links)

I've installed the Drupal 7 port of the Node to Word module for exporting nodes as word or txt documents. The module packs two links - "Save as Word" and "Save as Text" - into the $content['links'] ...
1
vote
0answers
280 views

hook_node_view can't change content

I've read through many questions asking this same thing, but I feel like I'm doing what they are suggesting and it's still not working. I've created a custom module and enabled it. This is my code: ...
0
votes
1answer
75 views

Place a link at top AND bottom of each node

I made some code to put a button/link at the bottom of a node. But it would be nice to place this link also at the top of the node. Would this be possible? This is the code that places a button at ...
1
vote
1answer
317 views

How can I display Drupal comments on a separate page from hook_node_view()?

I have a custom implementation of hook_node_view() that changes the display of comments on every node. I would like to know how I can get the result of this improved hook_node_view() to be displayed ...