none
Modifying the preview pane style RRS feed

  • Question

  • I have a contacts list and using the preview pane style. In the left column I have contacts listed by the last name and on the right I get the information about the selected contact. How can I customize the left column so there would be the list displaying "company" instead "last name"?

     

    Thanks,

    Luka

    Friday, July 30, 2010 6:34 AM

Answers

  • You can customize the preview pane style view of the list in SharePoint Designer 2010:

     

    Click Modify View ->Modify in SharePoint Designer;

     

    In Split view of the previewpane.aspx page, click the last name in the designer panel and find code as follows in the code panel:

     

    <xsl:choose>

         <xsl:when test="$titlevalue=''">

            <xsl:value-of select="$Rows/@resource.wss.NoTitle"/>

         </xsl:when>

         <xsl:otherwise>

                    <xsl:choose>

                                    <xsl:when test="$HasTitleField">

                                                    <xsl:value-of disable-output-escaping="yes" select="$titlevalue" />

                    </xsl:when>

                                    <xsl:otherwise>

                                    <xsl:value-of select="$titlevalue" />

                    </xsl:otherwise>

                    </xsl:choose>

         </xsl:otherwise>

    </xsl:choose>

                                                   

    Replace this code block with the following line:

                    <xsl:value-of  select="$ThisNode/@company" />

     

    Save the change. Now, the company instead of lastname will be displayed.

    • Marked as answer by GuYuming Friday, August 6, 2010 5:51 AM
    Monday, August 2, 2010 9:49 AM

All replies

  • You can customize the preview pane style view of the list in SharePoint Designer 2010:

     

    Click Modify View ->Modify in SharePoint Designer;

     

    In Split view of the previewpane.aspx page, click the last name in the designer panel and find code as follows in the code panel:

     

    <xsl:choose>

         <xsl:when test="$titlevalue=''">

            <xsl:value-of select="$Rows/@resource.wss.NoTitle"/>

         </xsl:when>

         <xsl:otherwise>

                    <xsl:choose>

                                    <xsl:when test="$HasTitleField">

                                                    <xsl:value-of disable-output-escaping="yes" select="$titlevalue" />

                    </xsl:when>

                                    <xsl:otherwise>

                                    <xsl:value-of select="$titlevalue" />

                    </xsl:otherwise>

                    </xsl:choose>

         </xsl:otherwise>

    </xsl:choose>

                                                   

    Replace this code block with the following line:

                    <xsl:value-of  select="$ThisNode/@company" />

     

    Save the change. Now, the company instead of lastname will be displayed.

    • Marked as answer by GuYuming Friday, August 6, 2010 5:51 AM
    Monday, August 2, 2010 9:49 AM
  • I tried replacing the whole block with just that one line and it does not seem to show up on the page, but when I click it, it still works. I can't tell if it works (because it won't display) or why it won't display. Below is a screenshot of what it looks like now. If anyone can get back to me asap, that would be wonderful! Thanks!
    Monday, April 15, 2013 9:10 PM