图片在节点中附加主题图片
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了图片在节点中附加主题图片相关的知识,希望对你有一定的参考价值。
This snippet is for use with image_attach, a small contributed module that uses image module to create nice thumbs in any node type.The template snippet makes the images show up larger in the body node, and instead of linking to itself, it links to the attached image node.
theme_add_style(drupal_get_path('module', 'image_attach') .'/image_attach.css'); $image = node_load($node->iid); $info = image_get_info(file_create_path($image->images['preview'])); $output = ''; $output .= '<div style="width: '. $info['width'] .'px" class="image-attach-body">'; $output .= l(image_display($image, 'preview'), "node/$image->nid", array(), NULL, NULL, FALSE, TRUE); $output .= '</div>'." "; $output .= $node->body; return $output; }
以上是关于图片在节点中附加主题图片的主要内容,如果未能解决你的问题,请参考以下文章
WordPress 2020主题 怎么在header和footer加入背景图片?