If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Hiding Cognos Connection (or viewer portlet) Elements

Started by michal, 08 Nov 2012 08:49:09 AM

Previous topic - Next topic

michal

Hi folks,

I've been fighting a lot with the cognos config  :o

I am trying to hide a few elements (namely 'properties' and 'more') from some of our users.

I have followed Paul's great blog and post found here : http://cognospaul.wordpress.com/2011/09/11/hiding-cognos-connection-elements/

However, I am not seeing what i thought I would.

We are on cognos 10.1.1 currently, in production / test / dev.  Multi tiered setup, so I have to edit files on the application servers and content managers etc. 

Thus far, i have only edited .\templates\ps\logicsheets\presentation\main\presentation.xsl
as well as the .\templates\ps\portal\system.xml   (on each of our servers)

we do hide some other elements (as per provided IBM ones) - and that works well so i am pretty sure i got the right system.xml at least.

I have limited my changes to just 'properties' icon to try and narrow down the possibilities of errors.

presentation.xsl change (for me, line 3843) :


<out:if test="not(contains($ui_black_list, ' HIDE_PROPERTIES '))">
<xsl:call-template name="renderAction">
<xsl:with-param name="onclick">actions('{xtsext:javascriptencode(string($obj-name))}', '{$obj-class}', '{xtsext:javascriptencode(string($obj-path))}','properties_general.xts');</xsl:with-param>
<xsl:with-param name="icon" select="'action_properties.gif'"/>
<xsl:with-param name="tooltip" select="'IDS_PROPERTIES'"/>
</xsl:call-template>
</out:if>


system.xml has the corresponding changes :


<param name="ui_hide">
                 (deleted a bunch of stuff we hide here)
<HIDE_PROPERTIES show="g1"/>
</param>


The result is :



Why is this hiding so much more than i expected?? :(

Ideally, all i want to provide is 'run with options' arrow.  Can anyone help me out here?

Also, which files do I edit to affect the cognos viewer portlet ?

CognosPaul

The snippet you posted looks correct.

I just did the same thing on my laptop, and it worked perfectly. I'm on 10.2, so I don't have access to the 10.1 files.

A few questions:
Did you save a backup of the original? What happens if you restore the backup and make the same change? What happens if you simply delete that block instead of hiding it?
Which editor are you using to make the changes? Which encoding? I've noticed that some tools tend to mess up certain character.
There are a number of locations that render the properties buttons, which one are you using? The group I modified has <!-- CRN Object --> two lines above it.
What happens if you use a HTML editor, like Firebug or IE Dev Toolbar, to look at the container? Are the buttons simply hidden or completely gone? Are the tds there with just the images missing?
What happens if you log in directly to the dispatcher? http://server:9300/p2pd/servlet/dispatch

Glad you like the blog. ;D

michal

Quote
Did you save a backup of the original? What happens if you restore the backup and make the same change? What happens if you simply delete that block instead of hiding it?

yes of course i have backups :)
i will try and re-do the changes, or also delete the entire block
the change DOES affect the user group i specified, but it just seems like it is taking out more than i anticipated... (where is my run with options arrow :/? or schedule link... ?)

Quote
Which editor are you using to make the changes? Which encoding? I've noticed that some tools tend to mess up certain character.

I am a big fan of Notepad++ (as i think you are :)) - i havent messed with any encodings so defaults... and changes i've made to system.xml seem to go through ok.

Quote
There are a number of locations that render the properties buttons, which one are you using? The group I modified has <!-- CRN Object --> two lines above it.

that's exactly the same spot as I editted... 2 lines above has the CRN Object comment :(

Quote
What happens if you use a HTML editor, like Firebug or IE Dev Toolbar, to look at the container? Are the buttons simply hidden or completely gone? Are the tds there with just the images missing?
What happens if you log in directly to the dispatcher? http://server:9300/p2pd/servlet/dispatch

great questions, i will get back to you shortly .... will test.  thanks for your assistance.

any guesses on what xsl affects the cognos viewer portlet? that's really what i'm after, but cognos connection could suffice.... maybe :)

CognosPaul

I've been looking for the Cognos Viewer templates for a while, but I'm beginning to suspect that the portlets are dynamically created, on the fly, based on a few js files. That's simple supposition of course - until I find them I won't know for certain.