Monday, March 12, 2012

Automatically show "More Information" content on the Person.aspx page of a My Site implementation

By default, the content contained under the "More Information" section of the Person.aspx page (i.e. the information displayed in the ProfileDetailsViewer web part) is hidden and will only display when the user clicks on the More information hyperlink.  If you wish to display this content when the user accesses the page, here is one possible option you can use:
  1. Open your browser and enter http://MySiteWebApp/person.aspx
  2. Click on Site Actions -> Edit Page
  3. Locate the Bottom Zone and click Add a Web Part
  4. Under Categories, select Media and Content
  5. Under Web Parts, select Content Editor
  6. Click the Add button
  7. Locate the newly added web part and click on the dropdown arrow in the upper right hand corner
  8. Select the Edit Web Part option
  9. Under Layout, place a check in the Hidden checkbox
  10. In the Content Editor web part, click on the link that reads Click here to add new content link
  11. In the Format Text ribbon, click on the HTML button and select Edit HTML Source
  12. In the HTML Source dialog, enter the following HTML: ​
  13. <script type="text/javascript"> _spBodyOnLoadFunctionNames.push("ExpandMoreInformationSection");   function ExpandMoreInformationSection() { ShowHideDetails('ProfileViewer_ValueAboutMe', 'ProfileViewer_ProfileDetails', 'ProfileViewer_Ellipsis', 'ctl00_PlaceHolderMain_ctl11', 'More information', 'Hide information');}</script> 
  14. Click OK
  15. Click OK
From now on, when the user views a profile (including his/her own profile), the content contained in the the ProfileDetailsViewer web part will be shown on page load.  Naturally, it can be hidden again if the user clicks on the "Hide information" hyperlink.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.