我们正在使用 websphere 门户 8 开发一个网站。有没有办法阻止门户将门户 CSS 集成到页面请求中提供的混搭文件中?CSS 包含我们在该网站上未使用的所有 Lotus ui 样式。
1016 次
1 回答
4
是的你可以。Portal 8 Theme 有不同的配置文件,您应该了解页面上加载了“多少 js/css/其他门户人员”之类的配置文件。你可以说页面使用光配置文件。要将配置文件设置为页面,您应该打开页面属性并设置属性
resourceaggregation.profile=profiles/profile_lightweight.json
但即使在这种情况下,您也会看到您不想看到的门户 CSS。所有配置文件 json 文件位于主题的静态部分theme/static/themes/Portal8.0/profiles
默认有4个文件
- profile_admin.json
- profile_defered.json
- profile_full.jon
- profile_lightweight.json
我想您可以创建自己的个人资料。
如果您仔细查看此配置文件,您将看到此配置文件将哪些模块带到页面,例如轻量级配置文件
"moduleIDs": [
"wp_theme_portal_80",
"wp_portlet_css",
"wp_one_ui",
"wp_one_ui_dijit",
"wp_legacy_layouts",
"wp_client_ext",
"wp_status_bar",
"wp_theme_menus",
"wp_theme_skin_region",
"wp_theme_high_contrast",
"wp_layout_windowstates"
],
在您的情况下,您对wp_theme_portal_80感兴趣- 如何知道该模块包含什么?要知道它,您应该打开贡献目录并查找theme.json文件。打开它,你会看到下一个
"modules":[{
"id":"wp_theme_portal_80",
"prereqs":[{
"id":"wp_client_main"
},{
"id":"wp_client_ext"
}],
"contributions":[{
"type":"head",
"sub-contributions":[{
"type":"js",
"uris":[{
"value":"/js/head.js"
}]
}, {
"type":"css",
"uris":[{
"value":"/css/master.css"
}, {
"value":"/css/masterRTL.css",
"type":"rtl"
}]
}]
}]
},
如果您使用轻量级配置文件,我们会将这些文件包含在您的 html 标记中。我想现在很清楚如何避免页面上的门户 css - 只需编辑配置文件 json/创建自己的配置文件/编辑 theme.json 如果您要修改 theme.json 或默认配置文件,请小心破坏默认门户主题
希望对您有所帮助。
于 2014-03-12T21:18:37.853 回答