View Single Post
  #1   IP: 49.87.3.169
Old 2015-11-25, 08:48 AM
Hahnaman Hahnaman is offline
初级会员
 
Join Date: 2005-03-20
Posts: 1
Hahnaman 现在声名狼藉
Default phpcms v9调用自定义字段显示的问题

今天在phpcms v9的模型管理里面的文章模型里面增加了一个字段“videourl”,但是在调用的时候发现调用的值确实“空”的。

找了半天才发现,调用自定义字段需要使用“moreinfo”属性才行:

{pc:content action="lists" catid="2" num="1" order="id DESC" page="$page" moreinfo="1"}
{loop $data $r}
<embed src="{$r[videourl]}" allowfullscreen="true" quality="high" width="347" height="298" align="middle" allowscriptaccess="always" type="application/x-shockwave-flash"></embed>
{/loop}
{/pc}

moreinfo的“1”的时候显示,为“0”的时候不显示。

见moreinfo="1"文字部分。这样重新生成页面就看到内容读出来了。
Reply With Quote