Friday, May 24, 2013

New page template for custom webcenter project : Not able to add as portal resource

I recently faced a strange issue while creating a new template for webcenter project in Jdeveloper. I created a custom page template for my portal application based on a quick start layout and added some custom code that displays content for header and footer region . Now when I tried to add this page template as a new page template in resource catalog by right clicking the PageTemplate.jspx and selecting create as portal resource. It gives me notification, that "the jspx document is not a valid page template or content presenter template. Recognizing the resource type as Page Style".

In <af:xmlContent> tag you should add:

<description>Facet for content</description>
And in some parte of your code you need add this:
<af:facetRef facetName="content"/>

After this change if you will try to add the template in resource catalog,it should work fine.Hope this helps.