简体   繁体   中英

Drupal : How to export node content to other website?

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!

使用node_view为节点的显示设置主题,并调用更改节点输出的模块。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM