簡體   English   中英

SharePoint Foundation 2010中的“ SPUrl”前綴

[英]'SPUrl' prefix in SharePoint Foundation 2010

我正在使用SharePoint Foundation2010。有一個母版頁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>

但是GACC:\\ Program Files \\ Common Files \\ Microsoft Shared \\ Web服務器擴展\\ 14中沒有程序集Microsoft.SharePoint.Publishing.dll 如何將'SPUrl'包含到web.config中?

使用相對路徑代替絕對路徑 您不想為簡單的CSS文件編輯web.config ...

有答案: http : //www.wictorwilen.se/Post/Creating-custom-themable-CSS-files-for-SharePoint-2010.aspx http://www.wictorwilen.se/Post/What-is- Sharepoint-2010.aspx中的CssRegistration控制新功能

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM