Requirement :
Version.aspx page shows the all metadata changes of all the field of a item. User was required only selected field to be viewed in version.aspx
Approch : We were having two approach
We were customising the sharepoint version.aspx page and decide to hide the not required field of a item.
We made a copy on versions.aspx page and put it into our application folder under layouts.
To hide the not required field put an additional "If" clause check in version.aspx page after the following line:
Search for the following line and Change <% foreach (SPField field in itemcurr.Item.Fields) %> line to <% foreach (SPField field in itemcurr.Item.Fields) { if(field.Title=="fieldTitle"){ %>
} Version.aspx page shows the all metadata changes of all the field of a item. User was required only selected field to be viewed in version.aspx
Approch : We were having two approach
- Write our own custom page to show version and iterate all the version of a item
- User the existing version.aspx page
We were customising the sharepoint version.aspx page and decide to hide the not required field of a item.
fieldTitle is name of the field that we wants to hide to be displayed in the version.aspx
we can add additional logic to check the other fields
Now for every version it create a link to view the field, we have disabled the link so that user can only see the version changes. Apply the following css to hide the view link in version.aspx page :
{
display:none;
}