“SPUrl” SharePoint Foundation 2010 中的前缀

发布于 2024-11-02 02:05:17 字数 959 浏览 2 评论 0原文

我正在使用 SharePoint Foundation 2010。 有一个母版页v4.master。我想向 head 添加一些控件:

<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>

但是没有程序集 Microsoft.SharePoint.Publishing.dll< /strong> 位于 GACC:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14 中。如何将“SPUrl”包含到 web.config 中?

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, Version=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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

楠木可依 2024-11-09 02:05:17

使用相对路径而不是使用绝对路径。你不想为了像 css 文件这样简单的东西而编辑你的 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...

南汐寒笙箫 2024-11-09 02:05:17

答案是这样的:
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

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文