Page attribute value showing null in oracle webcenter sites 11g R1

220 Views Asked by At

Hi I am working in oracle webcenter Sites 11g. I have added a new page attribute name pagetitle and added that in PageDefinition and add a new template with JSP logic and added the code:

<%=ics.GetVar("pagetitle")%>

but when viewing the page after creating a new page , the value of pagetitle is showing null.

2

There are 2 best solutions below

0
On

You have to load the page asset first after read the required attributes.

Below is the sample code for display the '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")%>
0
On

With this line in your JSP you can obtain all attibutes:

<ics:argument name="attributes" value="attribute1,attribute2,...,attributen" />

if want to use any attribute, do that.

For example: ${asset.attribute1}