SharePoint 2013 - 显示品牌页面中列表项目的详细信息,而不是默认的SharePoint详细信息页面 [英] SharePoint 2013 - display the detail from a list item in a branded page, NOT the default SharePoint details page

查看:173
本文介绍了SharePoint 2013 - 显示品牌页面中列表项目的详细信息,而不是默认的SharePoint详细信息页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当谈到SharePoint时,我是一个完整的初学者!所以,请原谅我缺乏知识。我相信这个问题的答案可能在互联网上的一百万个不同的地方。我相信StackOverflow是最好的答案......!

我有一个SharePoint网站集,最终将成为一个互联网站点。它是使用HTML母版页面和页面布局定制的品牌。所以,我想创建一个列表并将其用作公告列表。标题将会是一个链接,点击后链接到列表项详细信息页面。我创建了这部分。



但是,列表项详细信息页不是品牌。它转到默认样式的内部页面,其中包含详细信息。我不想要。我需要使用我已经创建的品牌,将详细信息页面看起来像网站的其他部分。

如何将详细信息发送到使用网站自定义品牌的网页?我知道可能有3个或更多的方法(dispform.aspx,REST API,Web部分),但我对这三个方法都感到困惑。

预先感谢。 / p>

解决方案

对于您的用例,REST API可能最简单&仍然满足您的需求。您可以针对项目详细信息启动一个简单的GET请求,然后按照您的自定义UI显示它。无论是加载一个自定义的表单页面,你甚至可以根据GET响应生成标记,并将其显示在模态DIV或详细信息窗格中。



REST调用参数将如下所示:

  url:http:// YourSiteUrl / _api / web / lists / GetByTitle('YourListTitle') / items(Item ID)
方法:GET
标题:
授权:持有者+ accessToken
接受:application / json; odata = verbose或application / atom + xml

请注意accept标头,以便您可以指定是要基于JSON还是XML基于输出。



有关使用REST API的MSDN参考: http://msdn.microsoft.com/en-us/library/office/dn292552%28v=office.15%29.aspx


I am a COMPLETE beginner when it comes to SharePoint! So, forgive my lack of knowledge. I'm sure the answer to this question is probably in a million different places on the internet somewhere. I trust StackOverflow for the best answer...!

I have a SharePoint site collection that will eventually be an internet site. It is custom branded using HTML master pages and page layouts. So, I want to create a list and use that as an Announcement list. The title will be a link that, when clicked, goes to list item detail page. That part I've created.

But, the list item detail page is NOT branded. It goes to a default styled, internal page that has the details. That I DON'T want. I need to have the detail page look like the rest of the site, using the branding I've already created.

How do I send the details to a page that uses the site's custom branding? I know there are possibly 3 or more methods (dispform.aspx, REST API, web part), but I'm confused about all three.

Thanks in advance.

解决方案

For your use case, the REST API would probably be simplest & still meet your needs. You can fire a simple GET request for the item details then display it however you wish in accordance with your custom UI. Be it loading a custom form page you build or even generating markup based on the GET response and displaying it within, say, a modal DIV or details pane.

The REST call parameters would look like this:

url: http://YourSiteUrl/_api/web/lists/GetByTitle(‘YourListTitle')/items(Item ID)
method: GET
headers:
    Authorization: "Bearer " + accessToken
    accept: "application/json;odata=verbose" or "application/atom+xml"

Note the accept header so that you can specify whether you want a JSON-based or XML-based output.

MSDN reference on using the REST API: http://msdn.microsoft.com/en-us/library/office/dn292552%28v=office.15%29.aspx

这篇关于SharePoint 2013 - 显示品牌页面中列表项目的详细信息,而不是默认的SharePoint详细信息页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆