共用方式為


Howto: Display list or document library data from a parent site within a different site

I get asked this one a lot, and thought I had blogged it but it looks like I didn't. The general user scenario is where you have a parent site (https://myserver) that contains a list of information that is relevant to a bunch of subsites (https://myserver/subsite) and you want to display the data from the parent inside the children.

For these steps, the server I am using is called: https://myserver, on this server is my subsite: https://myserver/subsite

  1. Open this subsite in FrontPage
    1. Browse to https://myserver/subsite/default.aspx and click File > Edit in Microsoft FrontPage, or
    2. Launch FrontPage and click File > Open Site and type in this URL
  2. Open the default.aspx page if it isn’t open already
  3. Data..Insert Data View (this should launch the Data Source Catalog)
  4. At the bottom of the Catalog, expand “XML Web Services”
  5. Click “Add to catalog”
  6. Type in this URL: https://myserver/_vti_bin/lists.asmx
  7. Click “Connect now”
  8. In the “Operation” drop-down, change the value to “GetListItems” method
  9. Change the listName property to “Announcements” (without the quotes)
  10. Click OK
  11. Right click this data source and choose “Show Data” (should launch the Data View Details taskpane)
  12. Select the fields you want to display
  13. Place the Cursor in the page where you want to insert the Data View
  14. Click “Insert Data View” from the taskpane
  15. From the Data..Style menu, you can control the appearance, paging, toolbars, etc.
  16. From the Data..Filter menu, you can add a filter for the data source
  17. From the Data..Web Part Properties dialog, you can control the web part chrome
  18. By going into code view, you can add the JavaScript to enable the drop-down menu items for editing the list items, if that’s what you want. You can also use FrontPage’s design tools to create hyperlinks. For example:
    1. Select the title data value
    2. Insert > Hyperlink
    3. Create a hyperlink to the editform.aspx page
    4. Click on Parameters
    5. Add a parameter to the URL for the List ID number
    6. OK back to the page

That should allow you to click on the Title and edit that specific list item

All of the functionality is there, it’s just a matter of knowing how to add it.
I made these steps very long to be careful, but it really is quite easy.

Let me know if any of this needs further clarification.

-John

Comments