Web part in only Document Library pages - sharepoint-2010

I've built a web part for SharePoint 2010.
Using SharePoint Designer I've got it to work on every page within the site, but then I realized that I only want it to work when users navigate document libraries.
Is there any way to do that? If not, how can I check that condition from the web part?

Using SharePoint Designer I've got it
to work on every page within the site
Does this mean you have embedded it in the master page?
A quick and dirty way; you could check the url for /Forms/ and only show it then.

Related

Quick launch visible back after published dashboard to Sharepoint site

We have a performancepoint services Business intelligence site, in this we dont need quicklaunch and top link bar for dashboards, so i have done this by adding the script in the content editor and hiding it, after doing this the quicklaunch/left navigation and top link bar have been hidden/removed. But when published the dashboards back to sharepoint site the left navigation and top link bar reset/unhidden.
Please suggest me how to make them hidden permanently even we do publishing the dashboards.
Thanks
If you have a PerformancePoint dashboard, you can add webparts inside of it. It sounds like you have done this by adding a webpart with custom css to hide those elements.
The problem with doing this is when you edit that dashboard PerformancePoint can take hold of that page and relay the webparts. Thus your webpart is no longer included in that page.
One option is editing your PerformancePoint site's masterpage or css for that site to remove those elements.
Another option would be to a stand alone webpart page within that site and deploy your PerformancePoint Content as individual web parts on the page. In my experience this becomes painful when you use lots of connected filters, since you will have to manually wire them up.

Sharepoint 2010 - Creating Web Part Zone without using Sharepoint Designer

I have created a page that has a top left and top right web part. The left web part will hold the navigation and the right will hold the body. When the two web parts are displayed they are vertical and I need them side by side (horizontal). Due to requirements the quick launch navigation will not work for us.
I figured that I need to create a web part zone and change the orientation to horizontal - Everywhere I look it says to use SharePoint Designer to create the web part zone and my company has turned off Sharepoint Designer usage.
Is there another way to create the web part zone or to get my two part parts side by side?
Thank you in advance for your help!
I've been creating Web Part Zones for the past several months amd sadly to say that I can only create Web Part Zones in SharePoint Designer using Edit File in Advanced Mode.

SharePoint 2010 Webpart Chrome

I created a web part and deployed it. I want to display only webpart data. I dont want to display toolbar which allow minimize, close and edit web part & title , i did set Chrome Type=None . but its not working. How can i make web part as non-configurable to users means user can see it. not configure it.
thanks
This is depend on privileges. Where you administrator you will see every web part options, but if you a anonymous user can see only title if you not set as chrome.

Cannot add WebPart to master page using SharePoint Designer

I've built a WebPart for a SharePoint 2010 site. I need to add it to one of its master pages (using SharePoint Designer), and when I select it from the WebParts menu I click it but I don't see it added on the design page...
Could you please tell me how to do it?
Thanks in advance!
Brian
Typically, the Web parts get added to Pages (in a Web Part Zone) not the master page. You can force this by entering Advanced Edit mode in SPD and add a Web Part Zone & Web Part but it is not the way in which Master Pages were intended to be used.

How to add a webpart to every document library (existing and future)

I'm working on a webpart for SharePoint 2010 and I would like to know how to config it to work in every existing and future document library. It won't be good for the project to add it every time a new document library is created.
Any ideas?
You need to create a custom List Definition which will include its own AllItems.aspx with your custom web part embedded.
However, this will work if you create the library of this template in future not for others.
Other solution could be to have your web part as a web server control and include it in your master page. This way, the control can find out if there is any ListView web part is present on page.