简体   繁体   English

Sharepoint Designer 2010,CSS和母版页

[英]Sharepoint Designer 2010, CSS and master page

Part of my job is to be able to change the css of a Sharepoint 2010 enterprise site. 我的部分工作是能够更改Sharepoint 2010企业站点的CSS。 I've the possibility to use Sharepoint Designer. 我可以使用Sharepoint Designer。 I've used it to make a copy of v4.master, set it as master page, added a few lines: 我用它制作了v4.master的副本,将其设置为母版页,并添加了几行:

<SharePoint:CssRegistration runat="server" name="/Style Library/... myfile.css" After="corev4.css"/>
<SharePoint:CssRegistration runat="server" name="/Style Library/... myfile.css" After="corev4.css"/>

Two questions: 两个问题:

1) Is there any danger in making a new master page via Sharepopint Designer if you only add these lines of code? 1)如果仅添加以下代码行,则通过Sharepopint Designer制作新的母版页会有任何危险吗?

I've seen some people writing about Sharepoint Designer being a little risky. 我见过有人写关于Sharepoint Designer的风险。 I'm no coder myself. 我自己不是编码员。 My only use of SP Designer is adding these lines in a master page and editing the CSS in Style Library. SP Designer的唯一用途是在母版页中添加这些行,然后在样式库中编辑CSS。

2) We have lots of subsites. 2)我们有很多子站点。 When I want to change the design on just one or two of these, should I continue the same path and add a uniqe css file in Style Library and link this file in a master page copy on the subsite? 当我只想更改其中一个或两个设计时,是否应该继续相同的路径,并在样式库中添加一个uniqe css文件,然后将此文件链接到子站点上的母版页中?

As far as i concern, There is no risk if you create your own master page or css file. 就我而言,如果您创建自己的母版页或CSS文件,则没有任何风险。 But it is risky to change the site's default master page or css file. 但是更改站点的默认母版页或CSS文件是有风险的。 So Don't change default master page or css file. 因此,请勿更改默认的母版页或CSS文件。 Create your own master page or css file. 创建自己的母版页或CSS文件。 If you feel problem with your created master page or css file, they revert to the default master page or css file. 如果您对创建的母版页或CSS文件有问题,它们会还原为默认母版页或CSS文件。 It will not affect your site. 它不会影响您的网站。

Thanks. 谢谢。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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