0

the internal field name for "Title linked to item" is "LinkTitle" When added to a csr file though it's undefined.

function CustomItem(ctx) {
// Build a listitem entry for every item in the list.

var ret = "<div class='ms-rteFontSize-2 '>" + ctx.CurrentItem.LinkTitle + " 
<strong>" + ctx.CurrentItem.Start_x0020_Date + " </strong></div><br />";
return ret;
}

How do I display the title linked to dispform.aspx - the same as what shows in a default list view?

0

I came across a property I didn't know existed - "displayFormUrl" and that did the trick. I couldn't use any of the "url path" options because the list view web part is on a page, so just reflected the page path, rather then the list's path. displayFormUrl returns the list url and all that's needed is to append the item id.

function CustomItem(ctx) {
// Build a listitem entry for every item in the list.

var ret = "<div class='ms-rteFontSize-2 '><a href='" + ctx.displayFormUrl + 
"&ID=" + ctx.CurrentItem.ID + "'><strong>" + 
ctx.CurrentItem.Start_x0020_Date + " - " + ctx.CurrentItem.Title + " 
</strong></a></div><br />";
return ret;
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.