2

In SharePoint 2013, I have a Pages library full of press releases. A press release page layout contains the following: Title, Article Date, Contact Name, Contact E-mail Address, Page Content.

On the homepage, I want to display the 10 most recent press releases and only display Title, Article Date and Page Content.

The custom Content Query Web Part has Title and Description fields I can use for Title and Page Content. How do I add the field for Article Date?

2

You should create/modify the itemStyle for your CQWP with your custom field like AreticleDate.

Steps:

  • Open your Root site via SharePoint Designer.
  • Go to all files > Style library > XSL Style Sheets > ItemStyle.xml
  • Create a copy from ItemStyle.xml then > Edit it as advanced mode.

enter image description here

  • Find the currently selected item style name > at any appropriate place in this template add

enter image description here

<div class="article-date">
<xsl:value-of select="@ArticleDate" />
</div>
  • Save > Check In > Publish as Major Version.
  • After you finish > go to your QCWP > Edit it > and select your custom style from Presentation > Styles > Item Style.

enter image description here

  • Bind the fields to display based on your fields in your page.

See also :- Displaying Custom Fields in a SharePoint 2013 Content Query Web Part

  • Can we add the Web Part Property with the Content Query Web Part, If yes Please provide me answer sharepoint.stackexchange.com/questions/197550/… – Ram Oct 21 '16 at 13:25
  • are you need to add a new field at fields to display section ? or new custom property ? – Mohamed El-Qassas MVP Oct 21 '16 at 13:41
  • New Custom Property with content query. – Ram Oct 21 '16 at 13:42
  • #M.Qassas, Can you please let me know the path. – Ram Oct 25 '16 at 7:06
  • Dear @Ram, I am sorry for late reply , but really I didn't do this before for a content query web part, I did it only for custom web part, and as you see in this thread it's related to displayed fields at item style, meanwhile , I am trying to find any solution since you communicate with me , once I got it I will inform you :) , Hope you get your solution ASAP :) – Mohamed El-Qassas MVP Oct 25 '16 at 7:20

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.