Use list item on main page

I am using a MOSS publishing site with a custom master page. One of our requirements is to have a "Site Updated" footer. We currently set this manually every time the site is updated.

What I am trying to do is reference a specific list item (from a custom list) that stores this date.

I am using the sharepoint designer to insert a data view into the master page, and then drop the list of custom shared folders from the data source library from it.

This works great and you can see the date when you view the root page of the site, as soon as you navigate to the child site, an error is returned:

This web part could not be displayed. To resolve this issue, 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 was looking for this error and tried to add curly braces to the list id, but that didn't solve the problem. Anyone have any suggestions?

+1


source to share


2 answers


Typically, the list area is the SPWeb that hosts it. This means that you cannot link to a list by id from a website. You can work around this by writing a control that opens the parent web directory and then opens the list. However, there may be other more elegant solutions to your problem.



+1


source


the first thing you need to do is figure out the exact error. here is one way to get more detailed error information. modify the web.config for the web application by changing the following settings:

also see the log file in the <12 hive> / LOGS directory for more details on the error.

finally check the event log.

I am assuming the dataview is referencing the custom list using a relative url which is invalid from the sub-site.



If so, one simple approach is to create a server control that will generate a valid URL for the custom list programmatically and add the server control to the master page.

it is also possible to do some XSL tricks to generate the correct url from dataview, but I am not very familiar with them.

JT

+1


source







All Articles