简体   繁体   English

在SharePoint 2010中动态更改母版页CSS

[英]Change Master Page CSS Dynamically in SharePoint 2010

I wanna know that how can we have different header color for different site collections like if I have created a site collection for ID 9080 having URL as (/usmanpc/9082/) and have top color assigned for it as blue, same i have another site collection for ID 9081 having URL as (/usmanpc/9081/) and have assigned green color for it's top header means that title bar. 我想知道我们如何为不同的网站集提供不同的标题颜色,例如,如果我为ID 9080创建了一个网站集,其URL为(/ usmanpc / 9082 /),并且为其分配了顶部颜色为蓝色,同样我也有一个ID 9081的网站集的URL为(/ usmanpc / 9081 /),并为其顶部标题分配了绿色,表示标题栏。 The problem is that I have created these two site collections via programming in c# and but how can I assigned or fixed the above 2 different colors for both those 2 different site collections. 问题是我已经通过c#编程创建了这两个网站集,但是如何为这两个不同的网站集分配或修复以上2种不同的颜色。 Any suggestions would be appreciated. 任何建议,将不胜感激。 Please bring me out of this nasty situation. 请把我从这种讨厌的情况中解救出来。

I could think of custom solution with included different masterpages for the different site collections with the desired custon css. 我可以想到定制解决方案,其中包括针对具有所需custon css的不同网站集的不同母版页。 Depending on how the custom solution is organized I would recommend activating the custom feature or just changing the masterpage of the site 根据自定义解决方案的组织方式,我建议您激活自定义功能或仅更改网站的主页
through automated powershell scripts (if you need to update many subsites for example) 通过自动的PowerShell脚本(例如,如果您需要更新许多子站点)

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

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