Change default redirection in an ECB (Edit Control Block) Menu.
I am sure lots of people would be wondering how to Change default redirection in a ECB Menu items of a list eg On clicking the "Title Column hyperlink" or the ”View Item” in ECB(Edit Control Block) Menu, the redirection must be to a different location.
For this the modifications needs to be done in CORE.JS file located at "C:\Program Files\CommonFiles\MicrosoftShared\webserver extensions\12\TEMPLATE\LAYOUTS\1033\CORE.JS"
NOTE: Make sure you take back up of Core.js file before making any change in order to prevent any server functionality malfunction.
1) Clicking on Title Column hyperlink of a List Item
Default Sharepoint Navigation:
On clicking on the Title Column, SharePoint takes you to the DispForm.aspx page.
See below Image:
The default navigation is done by the function "GoToLink(elm)" present in core.js
Place alerts in the core.js and understand each of the parameters.
Eg. To navigate to a different page, assign the destination url to the targetUrl
String.
See below Image:
ECB(Edit Control Block) Menu Navigation.
2) Clicking on “View Item” of a List Item in the ECB menu
Default Navigation:
On clicking on the View Item in the ECB menu, SharePoint takes you to the DispForm.aspx page.
The default navigation is done using function “AddSharedNamespaceMenuItems(m, ctx)” in present in customcore.js
Place alerts in the core.js and understand each of the parameters.
Eg. To navigate to a different page, assign the destination url to the strAction
String.
Same as you did for the "Title Column hyperlink".
If you are confused....we kings are here...
No comments:
Post a Comment