malthoff
malthoff

Reputation: 199

How to remove websphere portal UI CSS

We are developing a website using websphere portal 8. Is there a way to prevent the portal to integrate the portal CSS in the mashup files that are being served on a page request? The CSS contains all the lotus ui styles we do not use on that website.

Upvotes: 0

Views: 1035

Answers (1)

Georgy Gobozov
Georgy Gobozov

Reputation: 13721

Yes, you can. Portal 8 Theme has different profiles, you should understand profile like 'how many js/css/other portal staff' is loaded on the page. You can say page use light profile. To set profile to page you should open page properties and set property

resourceaggregation.profile=profiles/profile_lightweight.json

But even in that case you'll see portal css that you do not want to see. All profiles json files located in static part of your theme theme/static/themes/Portal8.0/profiles

By default there are 4 files

  • profile_admin.json
  • profile_deffered.json
  • profile_full.jon
  • profile_lightweight.json

I suppose you able to create your own profiles.

If you take a closer look at this profiles you'll see what modules this profiles brings to page, for example lightweight profile

"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"
],

In your case you interested with wp_theme_portal_80 - how to know what this module contains? To know it you should open contributions directory and lookup theme.json file. Open it and you'll see next

"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"
            }]
        }]
    }]
},

This files will we included in your html markup if you use lightweight profile. I suppose now it is clear how to avoid portal css on the page - just edit profile json/create own profile/edit theme.json Be careful to broke default portal theme if you'll be modify theme.json or default profiles

Hope it will helpful for you.

Upvotes: 4

Related Questions