[英]Drupal 7 print node type
I am trying to print the node type in a tpl but not having much look the code I am using is: type != 'commissions'): ?> 我正在尝试在tpl中打印节点类型,但看起来不太像我使用的代码是:type!='commissions'):?>
Any ideas? 有任何想法吗?
Cheers 干杯
tpl文件中有一个完整的节点对象。也许您可以:
$node->type;
Try this $node= node_load($nid); // $nid = your node ID $type=$node->type; then check ($type!='commissions')
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.