RSS

Tag Archives: ListMenuItem

Display Form Link/Menu on Column Other Than Title

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 ListMenuItem=”TRUE” and save. So your ViewFields section might look something like this:

<ViewFields>
	<FieldRef Name="SomeField1" ListMenuItem="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.

 
 

Tags: , , , , , , , ,

 
Follow

Get every new post delivered to your Inbox.

Join 35 other followers