Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6229147
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T09:30:55+00:00 2026-05-24T09:30:55+00:00

I’ve created a custom ItemStyle_ContactDetails.xsl for a SharePoint 2010 content query web part, which

  • 0

I’ve created a custom ItemStyle_ContactDetails.xsl for a SharePoint 2010 content query web part, which points to this custom file via the ItemXslLink property. The web part will be filtered to display only one record for that department’s contact info. The list it’s reading has these columns:

  • @Title — built-in SharePoint column
  • /dsQueryResponse/Rows/Row/@WorkAddress — built-in SharePoint column
  • /dsQueryResponse/Rows/Row/@PrimaryNumber — built-in SharePoint column
  • @EMail — built-in SharePoint column
  • @Opening_x0020_Hours — custom multi-line rich text column

The above names are what they’re called in the Data View Web Part from another site. I had the following in that DVWP that worked for a local site:

<td colspan="2" class="ms-vb" style="text-align:center">
  <b><xsl:value-of select="@Title"/></b><br></br>
  <div style="margin-top:10px;"><xsl:value-of 
       select="/dsQueryResponse/Rows/Row/@WorkAddress"/> 
      (<a href="{@Map}">MAP</a>) 
  </div>
  Tel: <xsl:value-of select="/dsQueryResponse/Rows/Row/@PrimaryNumber"/><br></br>
  <a href="mailto:{@EMail}"><xsl:value-of select="@EMail"/></a>
  <p><b>Opening Hours:</b></p>
  <div style="position:relative; top:0; margin:0">
       <xsl:value-of select="@Opening_x0020_Hours" 
       disable-output-escaping="yes"/>
  </div>
</td>

How do I translate this to the custom ItemStyle_ContactDetails.xsl template? The user needs to see the info without having to click a link to get to it — it’s always going to be just one record for that department. Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T09:30:56+00:00Added an answer on May 24, 2026 at 9:30 am

    Some serious trial-and-error yielded the result, along with this great article: http://www.heathersolomon.com/blog/articles/CustomItemStyle.aspx

    Maybe others trying this same thing can find this useful: You can edit the custom XSL file on the server via SPDesigner, but you can’t do the same with the web part and hope to have the changes immediately reflected. You must export the content query web part, then edit the file in Notepad, etc., to make your changes to the following 3 items:

    • Change the ItemXslLink to point to your custom XSL file:

      <property name="ItemXslLink" type="string">/Style Library/XSL Style Sheets/ItemStyle_ContactDetails.xsl</property>

    • Change the ItemStyle item in the web part to reference your template name; the template name in the XSL file is ContactDetails:

      <xsl:template name="ContactDetails" match="Row[@Style='ContactDetails']" mode="itemstyle">

      So in your web part, you’d have this:

      <property name="ItemStyle" type="string">ContactDetails</property>

    • Update the CommonViewFields to list your custom columns and their types:

      <property name="CommonViewFields" type="string">WorkAddress, Text; EMail,Text; Contact_x0020_Department,Choice; Map,URL; Opening_x0020_Hours,Text; PrimaryNumber, Text</property>

    Save the web part file and import (upload) it via the browser to your web part gallery. Each time you make changes to the web part, you’ll want to do this; the XSL file can be edited and saved in SPDesigner and the changes reflect immediately in the browser.

    Hope this helps someone who gets stuck like I was 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I am trying to understand how to use SyndicationItem to display feed which is
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I used javascript for loading a picture on my website depending on which small
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.