I'm new to Custom Fixed Layouts and I'm having difficulty getting our first one working.
I've made the following xml file named "my_first_fixed_area_layout.xml" and placed it into default\main\WORKAREA\shared\iw\config\fixed-layout\
<Canvas Id="canvas" html-id="my_canvas_id" css-class="my_canvas"> <Name>Custom Fixed Layout - Single Row</Name>
<Row Id="row-0"> <Area ID="row-0-area-1" component-spacing="0" component-css-class="my_component" width="200"> <Name>Header</Name> </Area> </Row>
</Canvas>
|
With this in place, I can select "Custom Fixed Layout - Single Row" as the site default, but I can't pick it when creating a new page.
After reading some forum posts here on devnet, I made the following changes to our pagetype-config.xml file:
<?xml version="1.0" encoding="UTF-8"?> <!-- This file contains customizations of page-type and layout configuration found in WEB-INF/classes/com/interwoven/livesite/pagetype-config.xml. You can use it to add new page-types and layouts (by specifying a new id) or override existing elements (by specifying an id that exists in the base file listed above). Page-types in one file can reference layout types in the other, and a page-type in the base file that references an overriden layout-type in this file will use the overriden layout-type.
Below are examples of adding a new default page-type that uses two new layouts (although they happen to be identical to some existing layouts). --> <layout-config> <page-types> <page-type id="XHTML " default="true"> <name>Fixed Area Layouts Test 3</name> <output> <doctype> <document-root>html</document-root> <doctype-system>http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</doctype-system> <doctype-public>-//W3C//DTD XHTML 1.0 Transitional//EN</doctype-public> </doctype> <method>html</method> <content-type>text/html</content-type> <omit-xml-declaration>true</omit-xml-declaration> </output> <allowed-layouts> <layout refid="my_first_fixed_area_layout"/> </allowed-layouts> </page-type> </page-types> <layouts> <layout id="my_first_fixed_area_layout"> <name>Where does this name show up</name> <stylesheet>com/interwoven/xsl/runtime/div-layout.page.xsl</stylesheet> <class>com.interwoven.livesite.layout.impl.DivLayout</class> </layout> </layouts>
</layout-config>
|
I restart LiveSite using the following:
d: cd\interwoven\teamsite\local\config\lib\content_center\livesite_customer_src build update pause
|
And I get this in our iw-home\local\logs\iwui\servletd_out.log file:
INFO: Initializing Spring root WebApplicationContext contextInitialized: error initializing spring application context! org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'teamsite.PageTypeConfigLoader' defined in ServletContext resource [/WEB-INF/conf/livesite/resources/teamsite-resource-config.xml]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: page-type id='XHTML ' references missing layout refid='my_first_fixed_area_layout' at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1362) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:540) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:485) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:169) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:170) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:413) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:735) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:369) at com.interwoven.livesite.spring.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:185) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:190) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45) at com.interwoven.livesite.spring.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:67) at com.interwoven.livesite.spring.web.context.TeamSiteDependentContextLoaderListener.contextInitialized(TeamSiteDependentContextLoaderListener.java:41) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardHost.start(StandardHost.java:719) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:516) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:578) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) Caused by: java.lang.IllegalStateException: page-type id='XHTML ' references missing layout refid='my_first_fixed_area_layout' at com.interwoven.livesite.model.rendering.PageType.(PageType.java:206) at com.interwoven.livesite.model.rendering.PageType.init(PageType.java:130) at com.interwoven.livesite.model.rendering.PageTypeConfigLoader.init(PageTypeConfigLoader.java:134) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1427) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1396) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1359) ... 31 more
|
I'm thinking that "references missing layout refid" means that I'm using the wrong name to refer to my Custom Fixed Layout, but I'm not sure.
Any ideas?
Thanks in advance,
Scott