1
votes

I'm using a MOSS Publishing site with a custom master page. One of our requirements is to have a "Site Updated" footer. Currently we set this manually each time the site is updated.

What i'm trying to do is reference a specific list item (from a custom list) that stores this date.

I'm using sharepoint designer to insert a Data View on to the master page, then dropping the custom sharepoint list on it from the data source library.

This works fine and you can see the date when you are viewing the root page of the site, as soon as you navigate to a subsite an error is returned stating:

Unable to display this Web Part. To troubleshoot the problem, open this Web page in a Windows SharePoint Services-compatible HTML editor such as Microsoft Office SharePoint Designer. If the problem persists, contact your Web server administrator.

I've googled this error and tried adding curly braces to the list ID but that hasn't solved the problem. Does anyone have any suggestions?

2

2 Answers

1
votes

Generally, the scope of lists is the SPWeb that hosts it. That means that you cannot reference a list by id from a subweb. You can work around this by writing a control that opens the list's parent web, and then opens the list. There may be other more elegant solutions to your problem though.

1
votes

the first thing you need to do is find out the exact error. here is one method for getting more detailed error information. change the web.config for the web application by changing the following settings:

also look in the log file in the <12 hive>/LOGS directory for more detailed error info.

finally, check the event log.

my guess is that the dataview is referencing the custom list using a relative URL that isn't valid from the sub-site.

should this be the case, one simple approach would be to build a server control creates a valid URL to the custom list programmatically and add the server control to the master page.

it may also be possible to do some XSL trickery to build the correct URL from the dataview, but i'm not very familiar with them.

jt