0

Under the "User Profile Service Application " managed service i have define the "My Site Host Location" URL to be :-

http://gvstg01:40708/discussionforum/generalDiscussion/_layouts/15/userdisp.aspx?ID=

So that when clicking on a username (for example in a created by field) it will redirect to the above URL. but my question if about how i can dynamically add the current userid to the end of the URL ? so that the actual URL for redirection will look as :-

http://gvstg01:40708/discussionforum/generalDiscussion/_layouts/15/userdisp.aspx?ID=22
  • 1
    You can modify the template of the page that generates the "created" link to parse and add that to the link so when you click it, its already there. Now if that link and the link you are sending them to are NOT the same thing, then you can modify the template of the "userdisp.aspx" to parse the user ID and append it during load. Without seeing the actual code and how you have it setup in practice, its hard to suggest something more specific. – GµårÐïåñ Sep 30 '13 at 22:50
  • 1
    Ok, you need to do a small bit of coding, I don't know how strong you are or how much you can handle. If need be, you can post the ASPX file for one of the documents and I can rip it apart, make a code for you and then you can open up and insert it on your end and test it. But basically you need to check the code for the profile page, see how its parsing the userid, which is the best way to do it if you don't know how, then adapt that to modify the link you are trying to achieve for you and that's that. Let me know how you want to go about it and I will stick with you and help you. – GµårÐïåñ Sep 30 '13 at 23:36
  • thanks for the reply, actually i can not locate the userdisp.aspx inside SharePoint designer. i can find a page named "Dispform.aspx" but there is not page named "userdisp.aspx"? can you advice please? – john Gu Oct 1 '13 at 0:03
  • It is possible that its generated on the fly but unlikely as it would be inefficient. If you trace the web path of the document by locating the physical root directory and going down the tree, should allow you to find the document. Generally if you look under C:\Inetpub\WWW it should by default be in there as part of the tree. Unless someone totally decided to change the virtual path you can begin there. I can give you a script that will display it for you but not sure how comfortable you are doing PowerShell. – GµårÐïåñ Oct 2 '13 at 20:41

Your Answer

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

Browse other questions tagged or ask your own question.