Sharepoint 2007 自定义列表模板
您好,我想创建一个关于如何创建已添加到我创建的网站之一的 Web 部件的小教程。
我知道有一个列表模板库,我可以在其中将此部分作为文件提供,但是我正在使用网站栏。
因此,导入到新站点时会导致错误吗?
用户是否需要事先创建网站栏,并且在导入我的自定义列表文件后是否会自动使用它们?
或者导入时会出现该列吗?
我目前还没有另一个网站可以测试这个,所以想知道这里是否有人已经知道这个问题的答案?
非常感谢您能对这个问题有所了解,并提前致谢=]
Hi I am wanting to create a little tutorial on how to create a webpart that I have added to one of the website's I have created.
I know that there is the List Templates gallery in which I could use to give this part as a file however I am using Site Columns.
Due to this will this cause errors when importing to a new Site?
Will the user need to create the Site Columns previously and will they automatically be used once importing my Custom List file?
or will when it is imported the column appear?
I don't currently have another site to test this on as yet so was wondering if anyone here already knew the answer for this?
Any light that can be shed on this question is very much appreciated and thanks in advance as well =]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我对你的问题完全感到困惑。列表模板库和自定义 Web 部件有何关联?
也许您指的是网站模板库?
I am totally confused by your question. How are List Templates gallery and a custom webpart related ?
Probably you meant site Template Gallery ?
如果这确实是一个列表模板(您通过进入“列表设置”并选择“另存为模板”来创建它),则网站栏、内容类型和列表架构都应包含在 stp 文件内的 manifest.xml 文件中。您不需要手动创建任何内容即可根据上传到列表模板库的模板生成列表。
如果这是列表定义功能,则您应该创建定义网站栏、内容类型和列表定义的功能。用户可以手动创建在名称、类型和几乎所有其他属性上匹配的网站栏(除了最重要的 ID)。每次在浏览器中创建网站栏时,都会为其分配一个不同的 ID。该 ID 与您在列表定义中定义的 ID 不匹配。
If this is truly a list template (you created it by going into List Settings and selecting Save As Template), then the site columns, content type, and list schema should all be contained in the manifest.xml file inside the stp file. You should not need to create anything manually to generate a list based on a template uploaded to the List Templates Gallery.
If this is a list definition feature, then you should create features that define the site columns, content type, and the list definition. The users can manually create site columns that match on name, type, and just about every other attribute, except the one that matters most - ID. Each time a site column is created in the browser, it will be assigned a different ID. That ID will not match what you have defined in your list definition.