Topic
  • 3 replies
  • Latest Post - ‏2012-11-21T22:09:12Z by SystemAdmin
SystemAdmin
SystemAdmin
30895 Posts

Pinned topic Adding layout templates to theme ear

‏2012-11-19T19:36:42Z |
Question: How do I refer to my layout files form the changeLayout.json and layout.json files if the layout-template files are held in a theme ear/ear?
Bacakground:
I'm developing a custom theme with custom layouts in Portal v8. I'm using the ear method for the theme deployment,s o I've got everything segregated into MyThemeDynamic.war and MyThemeStatic.war I've added my layout files to MyThemeStatic.war/themes/MyTheme/layout-templates
When I set the default layout template in the XMLAccess import, I can successfully see my custom layout.
But If I try to change the layout, it reverts back to the Portal 8.0 theme defaults.
I've tried several ways of referring to my layout files from layout.json.
I saw this: http://tinyurl.com/ch2nczp
but it prevents the default theme from working properly, and I want to keep both the default and this new custom theme.
I've also tried adding references to the xml access, as suggested here: https://www.ibm.com/developerworks/forums/thread.jspa?messageID=14909102&#14909102
I feel like I'm close, but I'm missing something.
Thank you,
Paul
Updated on 2012-11-21T22:09:12Z at 2012-11-21T22:09:12Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    30895 Posts

    Re: Adding layout templates to theme ear

    ‏2012-11-20T15:12:41Z  
    Additional Symptom:
    if I output to the console:
    console.log(ibmCfg.themeConfig.themeRootURI);
    It comes back witht he default dav location of the portal 8 theme:
    /wps/mycontenthandler/!ut/p/digest!xxxxxxxx/dav/fs-type1/themes/Portal8.0
    This tells me that somehow I'm not registering my theme properly.
    Any suggestions?
    I tried importing the XML theme definitions and I also tried putting directives directly into metadata.properties file.
  • Dennis_te_Lintelo
    Dennis_te_Lintelo
    77 Posts

    Re: Adding layout templates to theme ear

    ‏2012-11-21T13:51:32Z  
    Additional Symptom:
    if I output to the console:
    console.log(ibmCfg.themeConfig.themeRootURI);
    It comes back witht he default dav location of the portal 8 theme:
    /wps/mycontenthandler/!ut/p/digest!xxxxxxxx/dav/fs-type1/themes/Portal8.0
    This tells me that somehow I'm not registering my theme properly.
    Any suggestions?
    I tried importing the XML theme definitions and I also tried putting directives directly into metadata.properties file.
    Did you set this parameter for your theme:

    <parameter name="com.ibm.portal.theme.template.ref" type="string" update="set"><![CDATA war:<dynamic theme>/themes/html/<static theme>/]></parameter>

    In our case we put the static and dynamic content in a single war.
  • SystemAdmin
    SystemAdmin
    30895 Posts

    Re: Adding layout templates to theme ear

    ‏2012-11-21T22:09:12Z  
    Did you set this parameter for your theme:

    <parameter name="com.ibm.portal.theme.template.ref" type="string" update="set"><![CDATA war:<dynamic theme>/themes/html/<static theme>/]></parameter>

    In our case we put the static and dynamic content in a single war.
    I did set com.ibm.portal.theme.template.ref in the theme xml file, but it didn't work.
    It's funny you mention putting everything in the same WAR, that is how I ultimately I got it to work: I combined static and dynamic into a single war file following these instructions: http://www-10.lotus.com/ldd/portalwiki.nsf/dx/Create_a_custom_theme_without_WebDAV_with_8.0
    That was ultimately what worked.
    Thank you,
    Paul