开发者

Drupal 6 Rules Execute custom php output not in html body

开发者 https://www.devze.com 2023-04-03 18:52 出处:网络
I\'m using drupal-6.22, rules-6.x-1.4, and some modules. With the help of rules module, I\'ve set a triggered rule, when the condition happens, it execute custom php code.

I'm using drupal-6.22, rules-6.x-1.4, and some modules. With the help of rules module, I've set a triggered rule, when the condition happens, it execute custom php code. The custom PHP print some html like this:

<?php echo '<div><span><a href="whatever">whatever</a></span></div>'; ?>

BUT, the html just appears before the !DOCTYPE html tag, is there any method to place the code wherever I want?

(e.g. <div id="header">HERE!</div>)

I think in this case JS is in need, so I use drupal_add_js($output,'inline'), and called an outside function to place the html, still nothing happens.

I think there must be some method to let PH开发者_如何学GoP insert the output into the current DOM tree, is there any known function or variables for this?

Please help, thanks!!


drupal_set_message() seems to be the right thing for you.

0

精彩评论

暂无评论...
验证码 换一张
取 消