Applies To: SharePoint 2010
By default, the Title column in a list can be shown in a view in three different ways:
- Title
- Title (linked to item with edit menu)
- Title (linked to item)
Often you can just rename the Title column to whatever you want to have that functionality and you’re good to go. However, sometimes you want the link and/or menu on a different column. Unfortunately, this isn’t an option in the View editor within the browser. Fortunately, it can easily be done in SharePoint Designer without having to mess with XSLT at all.
Simply modify your view in SharePoint Designer:
Switch to the code view and scroll down to the purple section (you can only edit the yellow highlighted text in advanced mode – which we do NOT need to do here).
Link To Display Form
In the ViewFields section are a bunch of FieldRef elements. Find the one you want and add LinkToItem=”TRUE” and save. So your ViewFields section might look something like this:
<ViewFields> <FieldRef Name="SomeField1" LinkToItem="TRUE" /> <FieldRef Name="SomeField2"/> <FieldRef Name="SomeField3"/> </ViewFields>
In the above example, SomeField1 will now have a hyperlink that will open the display form for the list item.
Link To Display Form With Menu
This is pretty much the same as above except the attribute name is different. In the ViewFields section are a bunch of FieldRef elements. Find the one you want and add ListItemMenu=”TRUE” and save. So your ViewFields section might look something like this:
<ViewFields> <FieldRef Name="SomeField1" ListItemMenu="TRUE" /> <FieldRef Name="SomeField2"/> <FieldRef Name="SomeField3"/> </ViewFields>
In the above example, SomeField1 will now have a hyperlink that will open the display form for the list item and a drop down menu for choosing actions.
no way this will work. Have you tested it?
Guys does this work on WSS 3.0 with SP Designer 2007?
Although I make the changes, nothing changes…
Hi there. Tested this with SharePoint Online and SP Designer 2013.
seems that there is some mistyping. because “ListMenuItem=”TRUE”” was not working for me, but ListITEMmenu=”TRUE” – working fine
Roman was 100% correct! I have fixed the post. The correct attribute is ListItemMenu. Sorry for the trouble, thanks for the catch!
Why I can’t see in my code?
Thank you 🙂
Thanks this worked perfectly in SP 2010!
This solutions worked really well apart from one flaw!
If you add linkToItem=”TRUE” to a column and then make an amendment to the view this value disappears and therefore reverts back to just displaying text (the link disappears!)
This doesn’t seem to effect ListItemMenu=”TRUE”, which remains. Any ideas why this may be happening and has anyone got a workaround?
Is there a simple modification that can be made to open the form in edit mode instead of display?
Hello —
Is there a way to change the URL the Edit Item points to? ie, other than EditItem.aspx.
Regards,
Harris