修改主题的动态资源引用

您必须修改动态资源引用以链接到主题的静态资源

关于此任务

通过名为 wp_dynamicContentSpots_85 的模块定义动态内容点。此模块在 plugin.xml 文件中进行定义,当复制您的主题时已复制此文件。

过程

  1. 从完成复制主题的动态资源中步骤后创建的 CustomTheme 项目打开 plugin.xml
  2. 编辑标识和名称以具有唯一定制名称。使用具有贵公司名称前缀的定制插件标识来确保您的 .WAR 文件已失效。 请参阅“资源汇总的配置”,了解关于创建定制插件标识的更多信息。 例如,
    <?xml version="1.0" encoding="UTF-8"?>
    <plugin id="com.yourcompany.customtheme" name="Custom Theme Modules" provider-name="Your Company" version="1.0.0">
    
    <extension id="wp_dynamicContentSpots_custom" point="com.ibm.portal.resourceaggregator.module">
            <module id="wp_dynamicContentSpots_custom">
                <contribution type="dyn-cs">
                    <sub-contribution type="markup" ref-id="customtheme_footer">
                        <uri value="res:{war:context-root}/themes/html/dynamicSpots/footer.jsp"/>
                    </sub-contribution>
                    <sub-contribution type="markup" ref-id="customtheme_crumbTrail">
                        <uri value="mvc:res:{war:context-root}/themes/html/dynamicSpots/crumbTrail.jsp,smartphone@"/>
                    </sub-contribution>
                    <sub-contribution type="markup" ref-id="customtheme_topNav">
                        <uri value="mvc:smartphone/tablet@res:{war:context-root}/themes/html/dynamicSpots/navigation.jsp?type=top"/>"
                    </sub-contribution>
                    <sub-contribution type="markup" ref-id="customtheme_primaryNav">
                        <uri value="mvc:res:{war:context-root}/themes/html/dynamicSpots/navigation.jsp?type=primary,smartphone@,tablet@"/>
                    </sub-contribution>
                    <sub-contribution type="markup" ref-id="customtheme_secondaryNav">
                        <uri value="mvc:res:{war:context-root}/themes/html/dynamicSpots/navigation.jsp?type=secondary,smartphone@,tablet@"/>
                    </sub-contribution>
                    <sub-contribution type="markup" ref-id="customtheme_sideNav">
                        <uri value="mvc:res:{war:context-root}/themes/html/dynamicSpots/sideNavigation.jsp?startLevel=2,smartphone@,tablet@"/>
                    </sub-contribution>
                    <sub-contribution type="markup" ref-id="customtheme_mobileNav">
                        <uri value="mvc:smartphone/tablet@res:{war:context-root}/themes/html/dynamicSpots/mobileNavigation.jsp"/>
                    </sub-contribution>
                    <sub-contribution type="markup" ref-id="customtheme_commonActions">
                        <uri value="res:{war:context-root}/themes/html/dynamicSpots/commonActions.jsp"/>
                    </sub-contribution>
                    <sub-contribution type="markup" ref-id="customtheme_layout">
                        <uri value="lm:template"/>
                    </sub-contribution>
                    <sub-contribution type="markup" ref-id="85theme_toolbar">
                        <uri value="mc:wp_toolbar85@mvc:dyn-cs%3Aid%3A85toolbar%2Csmartphone%40%2Ctablet%40"/>
                    </sub-contribution>
                    <sub-contribution type="markup" ref-id="customtheme_head">
                        <uri value="res:{war:context-root}/themes/html/dynamicSpots/head.jsp"/>
                    </sub-contribution>
                    <sub-contribution type="markup" ref-id="customtheme_status">
                        <uri value="mc:wp_status_bar@res:{war:context-root}/themes/html/dynamicSpots/status.jsp"/>
                    </sub-contribution>
                </contribution>
            </module>
        </extension>
  3. 在本地磁盘上,访问在完成复制主题的静态资源中步骤时创建的 customTheme 目录。
  4. 修改定制主题的概要文件,使其包含 plugin.xml 中的模块。
    1. customTheme/profiles 文件夹,编辑每个概要文件。
    2. wp_dynamicContentSpots_85 模块替换为修改 plugin.xml 时创建的 wp_dynamicContentSpots_custom 模块。
    3. 保存您所做的更改。
  5. customTheme/nls 文件夹,编辑本地驱动器上的 theme_en.html 文件(或者任何作为您的缺省语言环境的文件)。对支持的语言的任何其他语言环境文件重复该步骤。
  6. theme_lang.html 文件中,查找出现的所有 85theme 并将其替换为 customtheme 例如,dyn-cs:id:85theme_head 变为 dyn-cs:id:customtheme_head
  7. 保存您的文件。

下一步做什么

注: 您无需修改 customTheme 文件夹中的 theme.html 文件。此文件除用于重定向到 nls 文件夹中的相应语言环境文件外,不用于其他用途。仅当您添加或除去语言环境时,才需要修改此文件。