Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

SPD is very uncomfortable for me.

I try to open master page ny using the path "\portal\davwwwroot_catalogs\masterpage", but visual studio give the error


Microsoft Visual Studio

Could not find file '\portal\davwwwroot_catalogs\masterpage\default.master'.

ОК

When i use "open with" menu of SPD, i can view results of my editing in browser only after closinng visual studio, but i'm want to see this without closing of visual studio.

share|improve this question
    
What version of SharePoint? –  Karthik Murugesan May 17 '11 at 14:35

3 Answers 3

up vote 4 down vote accepted

Try to forget the past and get comfortable with SharePoint Designer. It is not perfect, but it is a useful tool to have available, and is greatly improved over the 2007 version (and FrontPage ;-).

If you want a master page for your solution package, a good way to do it is to work in SPD to do the editing until you get what you want, then download a copy to put in your feature/solution using Visual Studio.

It shouldn't be a problem to have Visual Studio and SharePoint Designer open concurrently.

share|improve this answer

Don't go via the Web Folders (davwwwroot) method - this isn't supported, just open SharePoint Designer, navigate to your site through it's open menu, then find _catalogs\masterpage to edit your masterpage.

share|improve this answer
    
hm... i'm describe this way in second part of question, isn't it? –  IAfanasov May 17 '11 at 7:48
    
thx for reply:) –  IAfanasov May 17 '11 at 7:49
    
You can only open the masterpage in visual studio if you download a local copy. SharePoint Designer is the only supported client tool for editing of live data within a SharePoint site, provided you open that site within SharePoint Designer first. –  James Love May 17 '11 at 7:56
    
tnx for reply! it's realy bad news(( –  IAfanasov May 17 '11 at 8:42
    
Learn to love SPD ;) –  James Love May 17 '11 at 9:00

First of all, never, ever, ever edit the out of the box master; always make a copy and edit that copy if you must make changes to the original. This holds true whether you're deploying a master via a Visual Studio package (which is the best practice), or editing it in SharePoint Designer.

Yes, SharePoint Designer has gotten a lot better, but you've still got the issue that editing the master for site X in SPD will unghost the master (separate it from the original definition), and not give you a clear management path for pushing that updated master to other sites, or making future changes to that master.

With a Visual Studio package, you have the ability to push your new master with a feature, activate it on one or more site collections, then in the future simply push an update to that feature which will automatically update the master on any and all site collections where the feature has been activated.

You certainly can edit a master in Visual Studio (not the "live" master, but the master you're building to deploy in the package). Open the v4.master from the 14 hive in notepad, copy the contents of the file, and paste them into your custom.master that you've created in your Visual Studio solution.

Within your Visual Studio solution, you can create event receivers to detect the activation of the feature and automatically set that master as the master to be used on the site collection where the feature was activated (along with any webs under that site if you wish). Note that you should never assign the v4.master to search centers; search centers use the minimal.master and setting them to use the v4.master version will break the breadcrumb and a few other things. Inside your event receiver you'd want to include logic to determine the site type and set the appropriate master (so technically you are creating two masters for your site a custom_v4.master and a custom_minimal.master).

You can easily test your master by using the "F5" quick deploy in Visual Studio, which will compile the solution, push it to your test SharePoint server, and activate it. This way you can test your custom master without sending your untested WSP off to the real SharePoint server. It's not "live" like SPD editing, but it's pretty quick and painless.

There's a pretty good MSDN article here that goes through how to build a branding solution. This doesn't cover the logic to set custom_v4.master vs. custom_minimal.master automatically, but it should be a good start for you.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.