[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How to make a custom Item Style for use with Content Query Web Part (SharePoint 2007)

Posted on 2011-05-09
3
Medium Priority
?
675 Views
Last Modified: 2012-05-11
Good afternoon All,

I am in need of some assistance.  I am trying to modify the ItemStyles file to make a custom view for use with the Conten Query Web Part (CQWP).  The back-story would be: Using the News default publishing template, I would like to display the latest news title and the complete body of the news article.  I have seen on sites where they have done it to display the first 200 characters, but I need to know if it is possible to display the whole article's body.  If it is possible, please help me with understanding how to do so.

I have attached my existing ItemStyle doc for your review.
 Temp-ItemStyle.xsl.txt
0
Comment
Question by:hpmhelpdesk
  • 2
3 Comments
 
LVL 7

Accepted Solution

by:
ufarooq earned 1500 total points
ID: 35724620
I have done the same thing for the blog posts and it wont be much different for news either. you will be quering news site rather than blog site  .
you can use the first post by Matthew , he has done a great job . Inorder to show the full news (not 200 words ) dont use that code and specify any limit. Take a look at the links and let me know if that helps .


http://www.ableblue.com/blog/archive/2007/11/20/building-a-blog-host-part-3.aspx
http://blogs.msdn.com/b/ecm/archive/2006/10/25/configuring-and-customizing-the-content-query-web-part.aspx


same thing can be done in 2010 also its  not much different than 2007 .
0
 

Author Comment

by:hpmhelpdesk
ID: 35728095
Thank You Ufaroog for your post.  I was able to find those resources prior to opening this question.  I couldn't figure out how to modify the code for the news article.  Also, when I copied the code into my itemstyle file, it caused the other CQWP's to have an error and not display what it had been.

If you could assist further I would greatly appreciate it.
0
 

Author Closing Comment

by:hpmhelpdesk
ID: 35729662
Thank You, after taking a rest and coming back to it I was able to figure out what to do.  I had to change the body field to PublishingPageContent.  I also had to make the correct changes to the modified webpart file

Thank you again.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We had a requirement to extract data from a SharePoint 2010 Customer List into a CSV file and then place the CSV file into a directory on the network so that the file could be consumed by an AS400 system. I will share in Part 1 how to Extract the Da…
In case you ever have to remove a faulty web part from a page , add the following to the end of the page url ?contents=1
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses
Course of the Month19 days, 17 hours left to enroll

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question