Sharepoint - 可以从数据库输出未过滤的 HTML 吗?
我们的客户要求使用 Sharepoint,当然,我们必须实现 Sharepoint 并非真正设计的功能。 我们首先尝试尽可能地扩展内部 Web 部件,因此我们在 MSSQL 数据库中的存储过程、用户定义函数和自定义视图方面做了很多工作。
我正在从数据库中的字段生成 html 链接,并希望将它们显示在数据视图 Web 部件之类的内容中。 当然,所有显示的数据都会被过滤,以便显示为未渲染的 HTML。 有没有解决的办法?
或者,是否有任何类型的 Web 部件可以连接到另一个 Web 部件或数据源并显示来自该源的未过滤的文本/html?
Our customers have asked for Sharepoint and, of course, we are having to implement features for which Sharepoint wasn't really designed. We are first trying to stretch the in-house webparts as far as we can, so we are doing a lot of the work in stored procedures, user defined functions, and custom views in the MSSQL DB.
I am generating html links from fields in the database and wish to display them in something like a Data View web part. Of course, all of the data being displayed is being filtered so that it shows up as unrendered HTML. Is there a way around this?
Alternatively, is there any type of web part that can connect to another webpart or Data source and display unfiltered text/html from that source?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您需要在数据视图Web部件中使用XSLT来控制渲染。
您可以完全控制创建的 html 内容。 如有必要,禁用输出转义。
You need to use the XSLT in the dataview webpart to control the rendering.
You have full control over what html is created. disable-output-escaping if necessary.
我感觉您自定义 SharePoint 的方式错误。 要么你的我不太明白你的问题的描述。 我希望能更详细地描述您想要实现的目标。
据我所知,您永远不应该直接接触 SharePoint 数据库。 我认为您应该专注于创建列表、字段类型、WebPart 以及您可能需要的任何 SharePoint 组件; 而不是在内容数据库中乱搞。
SharePoint 有一个不错的开发 API。 学习需要一些时间,但最终可能是值得的。
您可以在 SharePoint 中连接自定义的 WebPart,这里是 示例。
I get a feeling you’re customizing SharePoint the wrong way. Either that your I don’t really understand the description of your question. I would appreciate a more detailed description of exactly what you are trying to accomplish.
As far as I know you should NEVER touch the SharePoint database directly. I think you should focus on creating lists, field types, WebParts and whatever SharePoint components you might need; instead of messing around in the content database.
SharePoint got a decent development API. It takes some time to learn, but in the end it’s probably worth it.
You can connect your custom made WebParts in SharePoint, here is a sample.