0
votes

I want to fetch contents from my Drupal site and show it on another site using CURL. I already have a module that creates a URL (menu) in Drupal and outputs the requested node using node_load() method. This way, I can select which specific fields to output to the requesting site.

However, I also have a module that alters the node's content. What is does is when a node is viewed, it looks for the img tags in the content and replaces the source attribute with its thumbnail version. In this module I look for a specific attribute of the node :

$node->content['body']['#value']

And replace the img tags if present..

My problem is when i call node_load() in the menu I defined on the first paragraph, it doesnt have that $node->content['body']['#value'] that's why the image tags are not replaced..

Thanks!

1
Not directly related but you may want to save yourslef some work and use drupal.org/project/imagecache instead of thumbnailing images yourself.Jeremy French

1 Answers

1
votes

Use node_view to theme the display of the node and invoke modules changing the node output.