Friday, April 10, 2009

User driven personalized skin in wps 6

We know now just to support the administrator Portal6 unified skin, not users own personalized skin. The following is a simple implementation of the process of personalized skin.

At $ portalPath / themes / html / Hebmc path has the following documents under the

1, since the definition of three sets of subject css: styles_default.css default version of the style; styles_big.css Style Deluxe Edition; styles_thin.css style version of Jane

2, modify the application of Default.jsp information session. Reference category are as follows:

<%@ page import="javax.servlet.http.HttpServletRequest"%>
<%@ page import="javax.servlet.http.HttpServletResponse"%>
<%@ page import="javax.servlet.http.HttpSession"%>
<%@ page import="com.ibm.wps.puma.User"%>
<%@ page import="com.ibm.portal.um.PumaLocator"%>

3, access to user information in session.

<%
HttpSession session = request.getSession();
String styleId = "01";
if (session.getAttribute("com.ibm.wps.util.session_user") != null) {
User user = (User) session.getAttribute("com.ibm.wps.util.session_user");
if(user==null){
…… }else{ ...

} ) %>

Through access to user information, access the settings on the skin field information.

4, personalized skin based on field information to determine the path stylesName.


href='' rel = "styleSheet" type = "text / css" />

5, the user successfully topic. Note: Topics for the course of this write-off required in order to have the effect of re-landing.