Sunday 13 April 2014

Login to Portal directly


If you have difficulties when signing into the Portal 8, try logging in through this url
localhost:10039/wps/portal/cxml/04_SD9ePMtCP1I800I_KydQvyHFUBADPmuQy?userid=wpsadmin&password=yourpwd

This situation may arise when you try to apply custom theme to default Login page and suddenly the Login Portlet disappears.

Monday 6 January 2014

Setting Theme Profile via Admin Console

Profiles play an important role in Themes. Profiles determine the features the portal page has to load.


Approach 1 : Changing Profile through Edit Mode console


1. Click Edit Mode on the top right of the page.

2. Click Edit from Overview Tab

3. In the Page properties dialog, click Advanced Tab and choose Profile from the drop down and click Save.


Approach 2 : Changing Profile through Administration Mode


1. Locate the Page for which the Profile has to be set, and click Edit Page Properties Icon.

2. In Advanced options, click I want to add Page Parameters.

3. Provide a key-value pair as follows and click OK to save.
          key : resourceaggregation.profile
          value : profiles/profile_full.json
         The above key/value pair is for Full Profile.Do the same for other types of profile.

Sunday 17 November 2013

Reading Portal Page's Unique Name in Theme 8

To get the name of a unique page in portal's dynamic contents such as navigation.jsp, use the following code.
${node.objectID.uniqueName}

Tuesday 29 October 2013

Accessing User Credentials in Portal 8 Theme


It is possible to access the logged in user credentials in Portal 8 theme in any of the dynamic jsp (such as navigation.jsp, commonActions.jsp etc.,

The following are the required attributes needed to access the credentials.

1. Email  - ${wp.user['mail']} or ${wp.user['ibm-primaryEmail']}
2. Name - ${wp.user['givenName']}
3. Surname - ${wp.user['sn']}
4. Group - ${wp.user['cn']}

For more information Click Here

Sunday 27 October 2013

Checking whether a Portal Page has Page Parameters set

In order to check whether a Portal Page has page parameters use the following...

<c:set var="some_variable" value="${node.metadata['key']}"></c:set>


Accessing Page Parameters from Portal Themes

It is possible to access Page Parameters from Portal Theme using 
<portal-logic:pageMetaData> tag 

<portal-logic:pageMetaData varname="pageMetaData">
     <c:forEach var="metaItem" items="${pageMetaData}">
       ${metaItem.key}              <!-- Gives Page Parameter Key -->
       ${metaItem.value}            <!-- Gives Page Parameter Value -->
     </c:forEach>
</portal-logic:pageMetaData>

Portal 8 Theme - Checking Logged in User Role Type

To check whether logged in user belong to admin group check the following in your Theme's any of the dynamic jsp (eg: navigation.jsp, footer.jsp and so on)

<c:set var="admin" value="<%=com.ibm.portal.ac.data.RoleType.ADMIN%>"/>
<c:if test="${wp.ac[wp.selectionModel.selected].hasPermission[admin]}">
//if admin
</c:if>



Role Types

The com.ibm.portal.ac.data.RoleType object shown above exposes the following RoleType constants:

ADMIN
SECURITY_ADMIN
DELEGATOR
CAN_RUN_AS_USER
MANAGER
EDITOR
MARKUP_EDITOR
CONTRIBUTOR
PRIVILEGED_USER
USER


For more information Click Here