Sharepoint: Using custom layout the drag and drop of webpart is not working - sharepoint

I am having an issue with the drag and drop of webpart in sharepoint. The following described what I have done:
I am using MOSS 2007.
Created some custom page layouts that's based on the original BlankWebPartPage.aspx and tweaked to matched our HTML carve.
Created custom web parts.
attached those web parts to the pages that's based on the custom layout.
Now the web parts are working fine, except for the part that it cannot be dragged and drop to other web parts container on the same page.
If anyone can show me:
1. How to diagnose the issue on what's causing it?
2. Is the drag and drop supposed to work on a custom layout?
3. What's the error that's causing it not to work?
Thanks in advance!

Is this the issue you're experiencing: http://blog.mastykarz.nl/css-causes-javascript-error-while-moving-web-parts-in-edit-mode/?

Yeah that's the one exactly! There is another link in there:
http://neilmosafi.blogspot.com/2007/11/sharepoint-dragging-webparts-causes.html
That link shows a javascript to fix the issue.

You might try dragging into the "add web part" portion of the container of zone. I've had issues with dragging the web parts into position, particularly custom web parts.
Also, can you post some code? Particularly the page layout. Feel free to clip out the most non-essential parts, but it should help to diagnose your problem.

Related

SharePoint: Can I create different navigation bars for different pages?

I'm new here. I'm working on a SharePoint website and I want to create a different navigation bar for a part of pages while others use the global navigation bar. It is like they are different websites but actually they are not. I wonder is that possible? If it is, how can I make it?
In addition, according to my research, it's possible to have a different navigation bar if I create a subsite, right?
The problem now is that I don't have the permission to create a subsite, that's why I'm asking if I can create a different navigation bar for a set of pages.
Thank you!
For a SharePoint site, there are two sets of navigation.
One: Global Navigation. Two: Site Navigation (Which is mostly the sites Left side navigation)
These articles describes more about having multiple navigation elements in a site: https://technet.microsoft.com/en-us/library/ee695757.aspx
https://support.office.com/en-us/article/customize-the-navigation-on-your-sharepoint-site-3cd61ae7-a9ed-4e1e-bf6d-4655f0bf25ca
Note: Instructions vary based on your SharePoint environment and setup. For better understanding if you can share which version of SharePoint you are working on. can give more insights. Hope this helps!

How can I show/hide webpart zone on a page layout base on condition?

I am very new in SharePoint. I'm using SharePoint 2013.
As a title of question. I want t create a page layout contain 4 webparts. Now I want to show / hide each of those webpart base on a condition ?
How can I do that ?
Thank for any help.
Could you use audience targeting for this? I'm not sure if this feature was removed from web parts but I know you could do it In so 2007.
The other option is to edit your web parts code. Perform a check onload, if it's true let it run through the it's normal rendering process otherwise hide. I'm not aware of a way you can do it via the page unless you use Js which I'm not sure is possible. Would be a good idea to make this a configurable web part property in case the web part needs to be available to all at a later date.
Hope this helps
Cheers
Truez

can not add webpart to sharepoint page

i create a website on my local machine but i can't add webpart to web page, it don't rise any error but th webpart don't display to the page. anyone help me.
Thanks
I know this is an old question, but it's ranking high in Google results, so I figured I'd answer it anyway.
Make sure you're not running any code in the layout page's codebehind that calls and then closes SPContext.Current.Web. I had this exact behavior and that was the culprit
To test, add a different web part to a default page layout. If it adds, then it's either your web part or your code behind. If you can't add any web parts to your custom layout, it's your code behind. If it's just your web part, it's your web part.
Remember, SPContext.Current.Web returns a reference to the current SPWeb object. SharePoint will close the object itself when it's done, and closing it early can cause "unpredictable behavior."
We had the same problem with Firefox some time ago, but the problem disappeared when we installed SP2 for SharePoint 2007. The only thing that surprises me is that you also have the problem with IE.

Can't preview web parts in web parts gallery

I get an "Unknown Error" when I click on any of the web parts in the gallery. What can cause this?
Thanks,
Eric
Some webparts require configuration prior to them working propery. In these cases you need to add the webpart to a page and click the drop down and configure what ever it asks for. The other possibility is that you did not deploy the webpart correctly or you are missing something that it is looking for.

Load a web part before other

I am stuck with a problem. I am having tool part where I get all the Lists present in the Site.
I have other web part which should get the selected List in the tool part.
I see that the web part is loaded first then the tool part. so the web part is unable to the List selected in the tool part.
Please note that the text box is in a User Control.
Please help me.
I have looked at your code and found the following:
First things first. You need to move AWAY from using ToolParts and the SharePoint native webpart. they are deprecated and are a remnant from SPS2003. In MOSS / WSS 3.0 you can and should use the ASP.NET WebPart.
Secondly, I think you are mixing things up. The ToolPartGetLists is not a toolpart, it is a webpart, that in itself loads the CustomToolPart, which in turn allows you to select a list.
This toolpart is only shown when you edit the shared webpart in the UI. The list you select is then persisted to the SelectedList property of the webpart using the toolpart.
The connected webpart then tries to read the SelectedList property I guess.
Like I said, I could go and try to fix the code for you, but it is not the way to go, you really (REALLY) need to switch to ASP.NET WebPart based webparts. The native sharepoint one WILL be fased out in the (near) future.
Here you can find an example, with code! (scroll to bottom for download link). As a bonus, it uses the built in sharepoint listpicker
I don't know of any way you could control the load order of elements (web parts) on the same page.
Sounds more like you want to have your second web part (the display of the lists) have a "default" when the page loads--which could be empty. Then it would be changed to the selected list only when the user clicked a new selection in the other web part (the list of lists).

Resources