简体   繁体   中英

Sharepoint: Where to store assets used in my custom master page?

I'm creating a custom master page for my SharePoint 2010 publishing site. There are images, css files and js files associated with this custom master page. Where should they be stored?

I'm using the SiteAssets library for now - is this a good choice?

Thanks.

是的,这是一个不错的选择,同时确保使用功能配置所有这些文件,这样可以更轻松地更新文件。

In my opinion, you should store everything under the site collection libraries, this way you get:

  1. Easy recovery in the cases you need to re-install the server[s]
  2. Versioning and permissions on resources
  3. Separation of resources between site collection
  4. Simple deployment between environments, as you do not need to copy the files manually or design and deploy a feature to do it for you

The preferred place is of course Style Library, this is what it is intended for.

If you are creating and deploying your files through code, you can also use the _layouts directory to store your files. This makes it simpler to share files between site collections. Visual Studio 2010 makes it really simple to add a reference to the Images folder and any files will then be deployed to the _layouts/Images URL.

The only advantage of this is that a site collection administrator cannot make changes to these files, only someone with access to the physical server. (Although this can also be a disadvantage if your logos or images are changing regularly).

I usually store them in _catalogs/masterpage/ORGNAME/...

You can refer this blog for actual implementation http://markviky.blogspot.com/2010/11/sharepoint-2010-web-content-management.html

-Vighnesh Bendre

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM