Archive for the ‘Master Page’ Category

This request was came up to us when we needed a picture library that every time users should be able to upload their own images to it without overwriting the others images. The problem was “overwrite existing files” checkbox.

There is a solutions for this issue (not useful in my opinion) which is about modifying the “upload.aspx” page on the server (_layouts folder). However it will affect farm scope. we need it just for a specific library.

I found a solution based on jQuery. I’m not very expert in terms of coding and JavaScript, however I tried my own way and made a simple code after some hours! ūüėÄ This workaround helped us. So I’m gonna share it with you here and hope that would be helpful for you too. Here is the summery of my workaround:

  1. Find if the prompt or page (upload) is related to our list (line 4)
  2. Find the check box and un-check it (line 6-7)
  3. Hide the section and also its description (line 8)

Here is the code:

	var form = $('form');
 	if ( form.attr('action').indexOf('YOUR 36 character List ID - Without Braces') > -1 )
	 	var checkbox = $('#ctl00_PlaceHolderMain_UploadDocumentSection_ctl03_OverwriteSingle');
	 	var multiple = $('#ctl00_PlaceHolderMain_UploadDocumentSection_ctl03_UploadMultipleLink');


  • on line 4 you must replace the ListID with you own Picture library ID or document library ID
  • Put this script in your default master page also link to jQuery file

Actually I came up with a request to disable the scroll bar for the site welcome page which was using the custom master page and had a full screen slider. but there were no need to scroll bars on the first page.

Just to mention, I had created the page using SharePoint designer (Right click on master page > new from master page) because it had it’s own scripts and not specific SharePoint content ( you know it was a Welcome page ūüėČ ) for example the page had the ribbon because it was created by a master page. after I put the scripts I found that the SharePoint fake scroll bars is visible however the page didn’t need to scroll at all and scrollbars make the page obscene.

So here I found the solution written by Stephan and in my case to customize and summarize it:

  1. In your master page and body tag, remove scroll=”No”
  2. add the following CSS styles to the page. Either using a CSS file or add styles inside the page.
body #s4-workspace{
    overflow: inherit !important;

When you have your own custom master page in SharePoint 2010, maybe you’d come up with this issue when saving a simple wiki page in Site Pages or a Wiki library.

“you must specify a value for this required field”

new wiki page error
new wiki page error


I googled and found the reason is because of a missing folder which I had removed (better to say hided incorrectly). and it is this place holder:

<asp:ContentPlaceHolder id=‚ÄúPlaceHolderPageTitleInTitleArea‚ÄĚ runat=‚ÄĚserver‚ÄĚ></asp:ContentPlaceHolder>

What I had done was I had put this code inside an ASP Panel and set the visibility of the panle to hidden.
I found that I should do this with CSS like this.

<asp:Panel runat="server" CssClass="hidden" >
<asp:ContentPlaceHolder id="PlaceHolderPageTitleInTitleArea" runat="server" />

I found these posts helpful :


Yesterday I was creating a simple gantt chart in a project task¬†list. The site master page was blueband,master. I found that you cann’t use gantt chart view in a site that uses a blueband as the master page. the gantt is bigger than the width of master page and it seems bad in the page .

Also I could not change my default master page. So the way I found to solve this problem was to directly change the master page of the view by using SharePoint Designer. I opened the list with SharePoint Designer, opened the gantt.aspx view, and with the use of Format menu and then Master Page Section, I changed the master page of this page.

I now however this page looks different from the other pages in the site , but I did not find any other way till now. This corrected the appearnce of the gantt chart.


Sometimes when you want to edit an aspx file ( for example a page layout ) within “_catalogs/masterpage” directory you may encounter this error :

The Master Page file “….” cannot be loaded .

I found that this masterpage is not published ! So after I checked it in and published the master page , I counld checked out and edit aspx files without any problem .

If you want to insert a flash movie into your sharepoint page, there are different ways to do that. one simple way is using a content editor web part. this is useful in simple designing and using web methods like webparts.
But if you want to use¬†the flash movie¬†in¬†your custom master page, so you don’t use any content editor web part and instead of that way, you can use the following way ( no¬†difference ! ) :

Here is the code you can use to insert the flash movie. use it in a Body tag. ( e.g : between <td></td> in a table )

<OBJECT classid=”clsid:D27CDB6E-AE6D-11cf-96B8-444553540000″
codebase=”,0,40,0&#8243; id=”myMovieName” style=”width: 710px; height: 248px”>
¬†¬†¬†¬†¬†¬†¬†<PARAM NAME=movie VALUE=”/images/main.swf”>
       <PARAM NAME=quality VALUE=High>
       <PARAM NAME=bgcolor VALUE=#ffffff>
¬†¬†¬†¬†¬†¬†¬†<param name=”salign” value=”T”>
¬†¬†¬†¬†¬†¬†¬†<EMBED src=”/images/main.swf” quality=High bgcolor=#ffffff
NAME=”myMovieName” ALIGN=”” TYPE=”application/x-shockwave-flash”
PLUGINSPAGE=”; style=”width: 710px; height: 248px” salign=”T”></EMBED></OBJECT>

the most important part is bolded and colored in blue. it means that this Value should exactly point to the location of your swf file. for example you can upload your swf file in a directory under the root of your site ( you can see some folders using sharepoint designer ) and use the address of the file.
( in my case : /images/main.swf )

Good Luck ! ūüôā