Monday, 16 August 2010

Document Libraries and Lists controls disappear when you add a webpart

I just noticed an odd behaviour – it seems that when you add a web part to a page that is related to a Document Library it hides the normal ribbon web part controls. Well, that sucks!

It did not affect the interface in 2007, but it appears as though they’ve built some logic in that says “If the page has a non-standard web part loaded, hide the ‘Library Tools’ controls”. It also puts the same web part on every other view page that is in the document library (which is kind of handy, but it does not leave you any way to get back to the Document Library settings pages).

The problem here is that the only way to then edit the document library settings is through SharePoint Designer… Does anyone see the flawed logic here?

Everyone loves pictures, so…

OTB Doc Library view (the ubiquitous allitems.aspx page)…

image

Add a web part (Content Editor Web Part for example) – Empty

Goooooooone!

Where are you Library Tools Tab? VVVimage

And out of edit mode…

image

Anyway, I suppose the only way to work around that issue is to create a page and insert the auto-generated library’s web part – at least the Document Library web pages then stay fully functional. Took me a while to realise what was going on – I thought some of the jQuery code I was putting in was hiding it by accident!

Cheers!

Brad

0 comments: