Last active
August 29, 2023 09:14
-
-
Save AshfaqMemon/31bce45c74a43bde3fcd5fc13a367e5e to your computer and use it in GitHub Desktop.
Determine status of Edit Mode in WebSphere Portal theme
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%!-- | |
In Any of the JSP file of the theme, place below code. You can modify according to your needs. | |
I had placed it in head.jsp | |
--%> | |
<c:set var="editModeQName" value="{http://www.ibm.com/xmlns/prod/websphere/portal/publicparams}editMode" /> | |
<c:set var="isEditModeActive" value="${wp.publicRenderParam[editModeQName]}" /> | |
<c:if test="${isEditModeActive}"> | |
<p>Edit mode is turned on</p> | |
</c:if> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// If you want to determine status on client side, plese use below syntax. wpModules should be available in your theme. | |
wpModules.toolbar.isEditModeActive() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Namespace: {http://www.ibm.com/xmlns/prod/websphere/portal/publicparams} | |
Supported Parameter list - | |
selection (NAME_SELECTION) | |
uri (NAME_URI) | |
parameters (NAME_PARAMETERS) | |
locale (NAME_LOCALE) | |
themeTemplate (NAME_THEME_TEMPLATE) | |
labelMappings (NAME_LABEL_MAPPINGS) | |
screenTemplate (NAME_SCREEN_TEMPLATE) | |
themePolicy (NAME_THEME_POLICY) | |
solo (NAME_SOLO) | |
showTools (NAME_SHOW_TOOLS) | |
hiddenContent (NAME_HIDDEN_CONTENT) | |
hiddenPages (NAME_HIDDEN_PAGES) | |
statePartition (NAME_STATE_PARTITION) | |
path-info (NAME_PATH_INFO) | |
focus (NAME_FOCUS) | |
deviceClass (NAME_DEVICE_CLASS) | |
digest (NAME_DIGEST) | |
pageMode (NAME_PAGE_MODE) | |
editMode (NAME_PAGE_EDIT_MODE) | |
infoMode (NAME_PAGE_INFO_MODE) | |
helpMode (NAME_PAGE_HELP_MODE) | |
You can query actual parameter by ${Namespace}/${mode} | |
For example - {http://www.ibm.com/xmlns/prod/websphere/portal/publicparams}hiddenPages - represent hiddenPages paramters |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment