Reputation: 1
I am new to WCMS. I need help in creating a brand new website using Oracle WebCenter Sites with more customization.
I have created the templates and pages. How do I use the assets and call the page attribute and its value in the templates?
How do I render the templates?
Upvotes: 0
Views: 510
Reputation: 1354
You have to load the page asset itself first so that you get all the attributes and later you can load each attribute and display their values respectively.
<asset:load name="anyName" type='<%=ics.GetVar("c")%>' objectid='<%=ics.GetVar("cid") %>' flushonvoid="true" />
<asset:scatter name="nameAssignedOnAssetLoad" prefix="asset" />
<ics:getvar name="asset:attribute_name" />
Above code snippet loads the Page asset and now you can load individual attributes using asset:load
tag (if they are basic asset type attributes) or assetset:setasset
tag (if they are flex asset type attributes).
If you are more comfortable with Java, you can use OWCS Java API and follow these steps mentioned in Developers Guide
To render a template you have to use render:calltemplate
tag with appropriate attributes. This tag invokes your template, basically the code/logic that you have written within the template.
As you're new to OWCS I will suggest you to go through basic examples of read and write as mentioned in Developers Guide, they will help you a lot.
Oracle has dedicated OWCS Community wherein your queries will be answered must faster!
Upvotes: 0