继续Drupal分享精神 QQ群:107748121 站长QQ:2275288328 skype: hellodrupal【drupal交流+drupal 建站+theme制作】
登录 注册

Drupal VIEWS api 之 views_embed_view 应用

在使用view时候,如果使用views api就更加很好的输出组织结构。
views_embed_view($name, $display_id = 'default')
//

使用一个php代码嵌入一个views视图
//
使用这个函数可以直接打印出来views视图结果。
参数如下:

$name 打算记载views的 名称

$display_id 显示Id,可以使用默认值

例子:

<?php
$views_name
= 'note_news';
print
views_embed_view($views_name, 'default');
?>

评论

sdfdsdf士大夫的说法的身份是对方身份

sdfdsdf士大夫的说法的身份是对方身份

发表新评论

此内容将保密,不会被其他人看见。
  • 自动将网址与电子邮件地址转变为链接。
  • 自动断行和分段。
  • You can use BBCode tags in the text.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.

更多关於格式化选项的信息

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.