I am working on a project that has a XsltListViewWebPart on a page that was added programmtically. This has strange security so I can't put the page in edit mode in the web interface and can't open it in designer. I need the "modified by" link to display as text and not as a link. I can edit the web part with the code below, but I am not sure how to access the xslt. There is a property for a xlsturl, which apparen't can be set as a link to an xslt file. If I could get a sample and place one someplace, that might work. If not, I'd love another solution.
using (SPSite spSite = new SPSite("
http://mysite"))
{
using (SPWeb spWeb = spSite.RootWeb)
{
spWeb.AllowUnsafeUpdates = true;
SPFile wikiFile = spWeb.GetFile("Pages/docum
ents.aspx"
);
using (SPLimitedWebPartManager wpm = wikiFile.GetLimitedWebPart
Manager(Sy
stem.Web.U
I.WebContr
ols.WebPar
ts.Persona
lizationSc
ope.Shared
))
{
try
{
foreach (System.Web.UI.WebControls
.WebParts.
WebPart wp in wpm.WebParts)
{
var wp2 = (Microsoft.SharePoint.WebP
artPages.X
sltListVie
wWebPart) wp;
/*
if (wp.Title == "Shared Documents")
{
wp.Title = "Project Documents";
wpm.SaveChanges(wp);
}
*/
}
}
catch
{
if (wpm.Web != null)
{
wpm.Web.Dispose();
}
}
}
spWeb.AllowUnsafeUpdates = false;
}
}
}
<script type="text/javascript">
$(document).ready(function
$('a[href*="userdisp.aspx"
return $(this).text();
});
});
</script>