开发者

'SPUrl' prefix in SharePoint Foundation 2010

I am using SharePoint Foundation 2010. There is a master page v4.master. I want to add some control to the head:

<head>
    ...
    <SharePoint:CssRegistration name="<% $SPUrl:~SiteCollection/Style Library/demo.css%>" runat="server"/>
    ...
</head>

and then next code to the web.config:

<compilation batch="false" debug="false">
  ...
  <expressionBuilders>
    ...
    <add expressionPrefix="SPUrl" type="Microsoft.SharePoint.Publishing.WebControls.SPUrlExpressionBuilder, Microsoft.SharePoint.Publishing, Vers开发者_如何学运维ion=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"/>
  </expressionBuilders>
</compilation>

But there is not assembly Microsoft.SharePoint.Publishing.dll in GAC or C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14. How I can include 'SPUrl' to the web.config?


use a relative path instead of using an absolute path. You dont want to edit your web.config for something simple as a css file...


There is the answer: 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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜