Topic on Extension talk:Vector

Setting Portlets Non-collapsible

2
Wikinaut (talkcontribs)

I've been hunting high and low for an explanation for how to set left sidebar nav elements selectively non-collapsible -- specifically, the Google Adsense 2 extension's portlet. Any suggestions? --Balerion 00:05, 5 June 2011 (UTC)

174.65.131.216 (talkcontribs)

If you view the source of the page and get the id of the element you want to stay non-collapsed....Example for adsense:

Adsense:

<!-- googleadsense -->
<div class="portal" id='p-googleadsense'>

Then you can add that id in the if statement near line 170 of modules/ext.vector.collapsibleNav.js:

Original:

if (
				state == 'true' ||
				( state == null && i < 1 ) ||
				( state == null && version == 1 && id == 'p-lang' )
			) {
				$(this)
					.addClass( 'expanded' )
					.find( 'div.body' )
					.show();
			} else {
				$(this).addClass( 'collapsed' );
			}

New:

if (
				state == 'true' || id == "p-googleadsense" ||
				( state == null && i < 1 ) ||
				( state == null && version == 1 && id == 'p-lang' )
			) {
				$(this)
					.addClass( 'expanded' )
					.find( 'div.body' )
					.show();
			} else {
				$(this).addClass( 'collapsed' );
			}

This post was posted by 174.65.131.216, but signed as Miigotu.

Reply to "Setting Portlets Non-collapsible"