Sharepoint 解决方案打包:如何为我的功能获取自定义图标?

发布于 2024-07-15 23:12:55 字数 247 浏览 3 评论 0原文

我不知道我在这里是多么愚蠢!

我有一个解决方案,它打包了一些母版页和布局等,我可以很好地部署它们,并且该功能很好地出现在“网站集功能”列表中。 不过,我想在我的功能旁边放置一个自定义图标。 我希望图标位于解决方案包中,因此需要在部署解决方案(而不是激活功能)时将图像放入列表或文件夹中。

这可能吗? 简单的?

关于所有这些共享点解决方案/feature.xml/element.xml,我还没有理解一些东西!

I am not sure how foolish I am being here!

I have a solution that packages up some master pages and layouts etc which I can deploy fine and the feature appears in the "Site Collection Features" list fine. However I would like to put a custom icon next to my feature. I would like the icon to be in the solution package and so require the image to be put in a list or folder when the solution is deployed (rather than a feature activated).

Is this possible? simple?

There is something about all this sharepoint solution/feature.xml/element.xml I don't grok yet!

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

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

发布评论

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

评论(3

时光匆匆的小流年 2024-07-22 23:12:55

这是可能的而且简单的。

  1. 在您的Feature.xml 文件中,只需包含ImageUrl="" 属性并指定图像的位置即可。 最佳实践是在 Template\Images 文件夹下创建一个包含图像的文件夹,然后引用此位置
  2. 将包含图像的文件夹包含在解决方案 ddf 文件中
  3. 部署后,您应该有一个 %12HIVE%\Templates\Images\ACMEImages包含图像

Feature.xml示例的文件夹:

<Feature 
    Id="21F724AE-9C1C-4F4D-AAE9-7789CA01A7E3"
    Title="ACME Lists"
    Description="List definitions for the ACME"  
    Version="1.0.0.0"
    Hidden="false"
    Scope="Web"
    ImageUrl="ACMEImages\acmelogo.png"
    xmlns="http://schemas.microsoft.com/sharepoint/">
    <!-- other feature file info omitted -->

DDF文件示例:

.Set DestinationDir=IMAGES\AcmeImagesRootFiles\TEMPLATE\IMAGES\ACMEIMages\acmelogo.png

It is possible and simple.

  1. In your Feature.xml file, simply include the ImageUrl="" attribute and specify the location of your image. The best practice is to create a folder under the Template\Images folder with your images and then reference this location
  2. Include the folder which contains your images in the solution ddf file
  3. Once deployed, you should have a %12HIVE%\Templates\Images\ACMEImages folder which contains your image

Feature.xml sample:

<Feature 
    Id="21F724AE-9C1C-4F4D-AAE9-7789CA01A7E3"
    Title="ACME Lists"
    Description="List definitions for the ACME"  
    Version="1.0.0.0"
    Hidden="false"
    Scope="Web"
    ImageUrl="ACMEImages\acmelogo.png"
    xmlns="http://schemas.microsoft.com/sharepoint/">
    <!-- other feature file info omitted -->

DDF file sample:

.Set DestinationDir=IMAGES\AcmeImagesRootFiles\TEMPLATE\IMAGES\ACMEIMages\acmelogo.png
入怼 2024-07-22 23:12:55

在 SharePoint 2010 中,Microsoft 默认图标为:GenericFeature.gif - 31 x 22 图像。 使用 VS 2010 和 SP 2010,您可以将 SharePoint“图像”映射文件夹添加到您的 SharePoint 项目。 然后将您的图像放入此文件夹中。 请务必在 *.feature 对象的“属性”面板中提供图像 URL。 使用如上所述的图像路径。

In SharePoint 2010, the Microsoft Default icon is: GenericFeature.gif - a 31 x 22 image. With VS 2010 and SP 2010, you can add a SharePoint "Images" mapped folder to your SharePoint project. Then place your image in this folder. Be sure to provide the Image URL in the Properties panel of the *.feature object. Use a path to the image as noted above.

烟雨扶苏 2024-07-22 23:12:55

尽管我完全按照他的建议做了,但皮特的解决方案对我不起作用。 我的问题是 SharePoint 正在 /_Layouts 文件夹而不是 Templates/Images 文件夹中查找图像。

Pete's solution didn't work for me although I did exactly as he suggests. My problem is that SharePoint is looking for the image in the /_Layouts folder rather than the Templates/Images folder.

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