Extension talk:CustomNavBlocks

Image-Bug
Version: 1.18.1 Hi i added an image right below the logo to the sidebar and this works fine but there is so much space between the logo and the image below! and when there is text below the logo there is not so much space between it! this looks pretty buggy!

Error in Mediawiki 1.16.0
Upon installing this extension, I got the following error at the top of my wiki: Notice: Undefined offset: 1 in .../extensions/CustomNavBlocks.php on line 46 Any ideas? --Gossamer 04:12, 4 February 2011 (UTC)

From what I can see looking at the code, this error is what happens when there is no pipe in your block name. The block name is supposed to take the form of "Pagename|title", but if it takes the form "Pagename" then the extension looks for $tpl->data['sidebar'][$block] (the "default sidebar item"?) and when it doesn't find that, it tries to set the variable blockTitle to the second item in a one item array, causing an error.

put TOC into sidebar
Could I use this extension to put a TOC for a page in the sidebar?--Two7s clash 14:34, 17 April 2010 (UTC)

edit tag
Can this extension switch off its edit tag? I seem to have one. Bsmither 17:11, 8 June 2009 (UTC)
 * I think I'm the only one seeing this as I'm the WikiSysop and as such, in the WikiMedia namespace, I can edit.Bsmither 02:50, 9 June 2009 (UTC)

User-defined sidebars
Is it possible for each user to change their sidebar in a custom way? 


 * Users may use JavaScript to customize their sidebars, as seen in Manual:Interface/Sidebar. If most users are not technicians and thus are unable to write the necessary javascripts themselves, then wiki admins may create and provide predefined gadgets for their users. —79.143.76.66 11:51, 11 March 2009 (UTC)

Blocks with capital letters
Is there a way for the blocks to start with capital letters? No mater what I do in the control page the block titles start with lower case letters. Do I need to edit the css? Thanks --Jeff.worldwide 19:48, 25 July 2008 (UTC)
 * Sorry for the late reply, but: This seems to be a problem with the english MediaWiki. This wiki (for which I originally wrote this extension) doesn't have this problem, but this wiki does. Also, the this wiki also has its block with lower-case strings. I will look into the matter and post it here. -- Mati 09:47, 17 August 2008 (UTC)
 * Ok, that was quick. Please see the upper-case block-titles-chapter on the subject-page. -- Mati 10:30, 17 August 2008 (UTC)

CustomNavBlocks version 2.0.0 requires MediaWiki version 1.13.0
If installed on MediaWiki 1.12.0 or older, CustomNavBlocks version 2.0.0 does display only the titles of navigation blocks, but not their content.

The  contains   equal to  —79.143.76.66 06:58, 23 August 2011 (UTC)

CustomNavBlocks and DynamicPageList (Wikimedia)
I'm using CustomNavBlocks along with DPL, and I've noticed that after some time the sidebar doesn't load custom blocks' content. The problem always disappeared when I purged cache of all custom blocks, so I decided to automatize this task, and done this little script: purgeSidebar.php. I put it in maintenance/ directory and let it run every day via cron. No more problems with disappearing blocks. Hope it will be useful for anybody. P.S. I'm not sure whether that is my cache config, or the DPL is screwing up, all I know is that purging blocks helps, so I made this script. Holek 23:08, 27 July 2010 (UTC)

External Link in new Tab / Window
I've tried using several solutions for having specific external links and sidebar external links open in a new tab, including these: and this on my normal pages: Neither worked for me, but I'm using CustomNavBlocks, so my problem might really be that Common.js contents don't apply on Mediawiki namespace pages. Have any of you CustomNavBlock users solved this problem? Thanks. --Skew 17:34, 7 February 2011 (UTC)
 * http://old.nabble.com/"Category:-Noindexed-pages"-puzzle-to30698862.html#a30863268
 * JQuery snippets
 * http://jimbojw.com/wiki/index.php?title=Popup_links_in_MediaWiki_to_new_window

CustomNavBlocks Links
I am wanting to change the font size and colour of the links in the sections. I know the titles are done via the .portlet h5, tag.

I have tried the .portlet a {font-size: 130%;}, but with no effect. Is there a specific piece of css code that addresses this anywhere?

RoverOne 09:02, 30 November 2011 (UTC)

I have found my own solution to this. When creating the CustomNavBlocks menu names or links I used the div id="cusnav" and by doing so gave me the following: of course it then leaves it all open to then apply it to the ul, ul li, ul li a, and so on, css to your hearts desire.

RoverOne 07:28, 3 January 2012 (UTC)

Odd behavior when there is a trailing space in a block definition in Mediawiki:CustomNavBlocks
When you enter a block definition with a trailing space after the page name, this results in the block's content being populated with  instead of the contents of Mediawiki:title. The block definiton:

Quicklinks |Quicklinks

generates a block like this one:

Quicklinks (block title, looking just as it should)  (block content, looking very wrong)

Removing the trailing space fixes the problem.

(Note: I had this problem at the same time that I was having the "Quicklinks" problem listed below, but I have been able to recreate this problem with other titles as well.)

Bizarre title problem
For some reason, when I set up a menu titled "Quicklink" or "Quicklinks", the first line of text displays where the title should be. If I change the title to something else, but change leave the page name quicklinks, the problem corrects itself.

Is this working with MW 1.19?
I'm migrating from 1.16 and it seems to be ignoring Mediawiki:CustomNavBlocks. I did a similar migration last month to 1.18 and it worked fine. I don't see any changes to the CustomNavBLocks.php file, is this working for failing for anyone else, and if it works did you have to do something to make it work?

Thanks. --Salquint (talk) 20:10, 31 May 2012 (UTC)

Inserting the search bar between other blocks
My users still use the Monobook skin, therefore the placement of the searchbar between other blocks is a important point. I suggest the following patch to version 2.2.1:

Hence any nonempty line in MediaWiki:CustomNavBlocks that does not contain a pipe and consists entirely of uppercase letters is passed to further processing as an empty block with that title. Thus, a line consisting of the word SEARCH (TOOLBOX, LANGUAGES, &hellip;) is interpreted as expected. - RV1971 (talk) 13:44, 1 February 2013 (UTC)

Problem with version 1.22.0?
Apparently it doesn't work, and provides the error message "Notice: undefined offset: 1 in /wiki/extensions/CustomNavBlocks.php on line 48". Anyone else experiencing the same problem? It was OK on my wiki until version 1.21.3.
 * P.S.: the problem seems related to the use of SEARCH and TOOLBOX in my MediaWiki:CustomNavBlocks page, if I remove them from MediaWiki:CustomNavBlocks the problem disappears.
 * P.P.S.: Problem solved by applying the patch described above, under "Inserting the search bar between other blocks". Thanks, RV1971.

Blocks from other extensions disappeared
The block from Collection extension is not displayed when CustomNavBlock enabled. How to add it back?