Skip to content

Commit

Permalink
fix: Fix Loading shared layout and site portlets - Meeds-io/meeds#2274 (
Browse files Browse the repository at this point in the history
#932)

Prior to this change, when the loaded page is using hideSharedLayout
flag, the shared layout CSS resources are loaded. This change makes sure
to avoid loading CSS Resources of portlets only when needed and
displayed.
  • Loading branch information
boubaker authored and exo-swf committed Jul 6, 2024
1 parent 605f9f8 commit 809d992
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,13 @@ public void setSkin(String skin) {
public Set<Skin> getPortletSkins() {
// Determine portlets visible on the page
List<UIPortlet> uiportlets = new ArrayList<>();
uiWorkingWorkspace.findComponentOfType(uiportlets, UIPortlet.class);
getCurrentPage().findComponentOfType(uiportlets, UIPortlet.class);
if (!PortalRequestContext.getCurrentInstance().isMaximizePortlet()) {
getCurrentSite().findComponentOfType(uiportlets, UIPortlet.class);
}
if (!PortalRequestContext.getCurrentInstance().isHideSharedLayout()) {
uiWorkingWorkspace.findComponentOfType(uiportlets, UIPortlet.class);
}
List<Skin> portletSkins = new ArrayList<>();
Set<SkinConfig> portalPortletSkins = getPortalPortletSkins();
// don't merge portlet if portlet not available
Expand Down

0 comments on commit 809d992

Please sign in to comment.