When I first started playing with Portal Server a couple of years ago, my experience was only with WSS. One thing that bugged me about Portal was the fact that there was no "easy" way to display links of all the lists in an area to the users without creating another list just for links. This is because the standard user permissions we had set up didn't allow them to see the "Manage Content" link.
An easy way I've found to create links to an area is by using HTML/JavaScript in a CEWP and querying the SharePoint Web Service.
Paste the following code into a Content Editor Web Part (in SharePoint Portal 2003) and it will show you all of the lists in the area (the DWP is also attached to this post).
<span id=ListList> </span>
<script language=javascript>
//Lists in area
//Uses SharePoint Web Service API to retrive list of lists in current area
//Author: Aaron Haydo, ashaydo@gmail.com
//Date creaed: 6-JUL-2007
getListList();
function getListList() {
var txt = document.getElementById("ListList");
//Build SharePoint Web Service URL based on current location
var wsURL;
wsURL = window.location.protocol+"//";
wsURL += window.location.host;
var path = window.location.pathname.split("/");
path.pop();
var x;
for (x in path) {
wsURL += path[x] + "/";
}
wsURL += "_vti_bin/lists.asmx";
//SOAP Action and XML
var wsSoapAction = "http://schemas.microsoft.com/sharepoint/soap/GetListCollection";
var wsXML = '<?xml version="1.0" encoding="utf-8"?>';
wsXML += '<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ';
wsXML += 'xmlns:xsd="http://www.w3.org/2001/XMLSchema" ';
wsXML += 'xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">';
wsXML += '<soap:Body>';
wsXML += '<GetListCollection xmlns="http://schemas.microsoft.com/sharepoint/soap/" />';
wsXML += '</soap:Body>';
wsXML += '</soap:Envelope>';
//Create XML Document and get HTTP response using XMLHTTP object
var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
var httpResponse = getServiceResults(wsURL, wsSoapAction, wsXML);
//If getServiceResults returns a 404, then it's probably because the
//page is being launched from a document library instead of a web part
if (parseInt(httpResponse) == 404) {
txt.innerHTML = "<p>This code can only be executed from a web part.</p>";
return;
}
else {
xmlDoc.loadXML(httpResponse);
}
//Get results into collection
listitems = xmlDoc.getElementsByTagName("List");
//Loop through results and build table rows
var output = "";
for (var x = 0; x < listitems.length; x++) {
output += "<tr title='";
output += listitems(x).getAttributeNode("Description").text.replace(/'/g,"`");
output += "'>";
output += "<td class='ms-vb-icon' valign='top'>";
output += "<a href='" + listitems(x).getAttributeNode("DefaultViewUrl").text + "'>";
output += "<img src='";
output += listitems(x).getAttributeNode("ImageUrl").text;
output += "' border=0 hspace=5 alt='Icon'>";
output += "</a>";
output += "</td>";
output += "<td class='ms-vb2' valign='top'>";
output += "<a href='" + listitems(x).getAttributeNode("DefaultViewUrl").text + "'>";
output += listitems(x).getAttributeNode("Title").text;
output += "</a>";
output += " (" + listitems(x).getAttributeNode("ItemCount").text + ")";
output += "</td>";
output += "</tr>";
}
//Display table
var table = "";
table = "<table border='0' width='100%' cellpadding='2' ";
table += "cellspacing='0' class='ms-summarystandardbody' rules='rows'>" ;
table += output;
table += "</table>";
txt.innerHTML = table;
}
function getServiceResults(url, soap, xml) {
//Send XML packet to web service and return HTTP response text
try {
if (xml.length > 0) {
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
xmlHttp.open("POST", url, false);
xmlHttp.setRequestHeader("SOAPAction", soap);
xmlHttp.setRequestHeader("Content-Type", "text/xml");
xmlHttp.send(xml);
if (parseInt(xmlHttp.status) == 404) {
return 404;
}
else {
return xmlHttp.responseText;
}
}
}
catch(e) {
alert(e.message);
}
}
</script>
Here is what the Web Part looks like:
