【发布时间】:2017-10-22 19:43:59
【问题描述】:
您好,我在 oracle webcenter Sites 11g 工作。
我添加了一个新的页面属性名称 pagetitle 并在PageDefinition 中添加了该属性,并添加了具有 JSP 逻辑的新模板并添加了代码:
<%=ics.GetVar("pagetitle")%>
但是在创建新页面后查看页面时,pagetitle 的值显示为null。
【问题讨论】:
标签: webcenter-sites
您好,我在 oracle webcenter Sites 11g 工作。
我添加了一个新的页面属性名称 pagetitle 并在PageDefinition 中添加了该属性,并添加了具有 JSP 逻辑的新模板并添加了代码:
<%=ics.GetVar("pagetitle")%>
但是在创建新页面后查看页面时,pagetitle 的值显示为null。
【问题讨论】:
标签: webcenter-sites
您必须在读取所需属性后首先加载页面资源。
下面是显示'pagetitle'的示例代码
<assetset:setasset name="Page" type='<%=ics.GetVar("c")%>' id='<%=ics.GetVar("cid")%>' />
<assetset:getattributevalues name="Page" typename='PageAttribute' attribute='pagetitle' listvarname="pagetitlelist" />
<ics:listget fieldname="value" listname="pagetitlelist" output="title"/>
<%=ics.GetVar("title")%>
【讨论】:
通过 JSP 中的这一行,您可以获得所有属性:
<ics:argument name="attributes" value="attribute1,attribute2,...,attributen" />
如果要使用任何属性,请执行此操作。
例如:${asset.attribute1}
【讨论】: