如何解决SharePoint Foundation 2010中的\'SPUrl\'前缀
| 我正在使用SharePoint Foundation 2010。 有一个母版页v4.master。我想在头部添加一些控件:<head>
...
<SharePoint:CssRegistration name=\"<% $SPUrl:~sitecollection/Style Library/demo.css%>\" runat=\"server\"/>
...
</head>
然后将下一个代码添加到web.config中:
<compilation batch=\"false\" debug=\"false\">
...
<expressionBuilders>
...
<add expressionPrefix=\"SPUrl\" type=\"Microsoft.SharePoint.Publishing.WebControls.SPUrlExpressionBuilder,Microsoft.SharePoint.Publishing,Version=14.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c\"/>
</expressionBuilders>
</compilation>
但是GAC或C:\\ Program Files \\ Common Files \\ Microsoft Shared \\ Web服务器扩展\\ 14中没有程序集Microsoft.SharePoint.Publishing.dll。我如何在Web.config中包含\'SPUrl \'?
解决方法
使用相对路径而不是绝对路径。您不想为简单的CSS文件编辑web.config ...
,有答案:
http://www.wictorwilen.se/Post/Creating-custom-themable-CSS-files-for-SharePoint-2010.aspx
http://www.wictorwilen.se/Post/What-is-new-with-the-CssRegistration-control-in-SharePoint-2010.aspx
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。