【发布时间】:2017-08-24 03:07:03
【问题描述】:
我尝试在表单内渲染图像,但仍然没有渲染任何内容
这是自定义模块
$image_options = array(
'path' => 'http://novelplanet.com/Content/images/noImage.jpg',
'alt' => 'Test alt',
'title' => 'Test title',
'width' => '50%',
'height' => '50%',
'attributes' => array('class' => 'image', 'id' => 'my-img'),
);
$image = theme('image', $image_options);
$form['y']['image_div'] = array(
'#prefix' => '<div class="image">',
'#suffix' => '</div>',
'#markup' => $image,
);
在我的 tpl 中
<?php print drupal_render($form['y']['image_div']); ?>
如何在 form.inc drupal 6 中渲染图像
【问题讨论】: