Solved

How do I customize the content query web part in SharePoint 2010?

Posted on 2011-02-16
6
825 Views
Last Modified: 2012-05-11
Hello Everybody,
We recently created page with a links list of over 50+ links.  Is it possible to use the content query web part in SharePoint 2010 to show only the top 10 frequently used links?  If so, could you please provide instructions on how to customize the content query web part.  Thank you in advance for your help.
0
Comment
Question by:amarelv
  • 3
  • 2
6 Comments
 
LVL 3

Expert Comment

by:Sleetish
ID: 34911531
The content query will only grab content that's available to it

I don't believe the list has any field that actively tracks activity.

I think this may be what you're looking for:

http://blogs.msdn.com/b/ecm/archive/2010/03/21/introducing-web-analytics-in-sharepoint-2010.aspx
0
 

Author Comment

by:amarelv
ID: 34911698
Hi Sleetish - Thank you so much for your quick reply.  I greatly appreciated your feedback but let me try to reword my question again.  We have already picked out the 10 links and somehow would like to "customize" it through content query web part to show those 10 links on the Home Page.  Is this possible?  Please let me know.  
0
 
LVL 6

Accepted Solution

by:
Rafael I earned 500 total points
ID: 34912144
Easy way:
Why don't you use a "Content Editor Web Part" instead and enter the links manually instead of trying to retrieve them?  If one of the 50 links changes, you'll have to edit it, but then you won't have to worry about trying to make data connect.

Hard way:
Create a yes/no column in your 50+ link library that you will edit to say yes if you want it to display on the homepage, then use a Content Query Web Part to retrieve values from your list that are set to "Yes".  This method would also let you set a value for how many links to display at a time.

One way is more fun and the other way is quicker :)
0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 3

Expert Comment

by:Sleetish
ID: 34912540
Amarely,

Very possible.  Rawsteak's suggestions would work.  His "Hard way" is actually more or less how "Top Sites" works.  You could actually customize a Top Sites web part and just change the query to get the same functionality.

Alternatively in a similar but not so hard way, you could add an additional field and put any value in it, and then sort items by that field, only put something in those 10 links fields, and limit the amount of links on the front to display only 10.  It will return those 10 first, so they would be the only links that show up.

Does that make sense?
0
 

Author Comment

by:amarelv
ID: 35030948
Hi Sleetish - Thank you for introducing me about the Web Analytics report and will need to do more research on it.  :)

Hi Rawsteak - I've decided to use your second suggestion and was able to pull the 10 links using the Content Query Web Part to retrieve values from list that are set to "Yes".  Could you please show me if there's a way for users to be able to clink on the link and it directly takes them to the website  instead of going through this page-?  Please see screen shot  below Page.  Thank you in advance for your help!
0
 

Author Closing Comment

by:amarelv
ID: 35189336
Thank you so much for all of your help.  It is greatly appreciated.
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

A question that is asked often, is how to generate sequential numbers in InfoPath Forms. The best way to achieve this is to use a SQL database, along with a stored procedure and a web service to connect Forms Services to the DB. The first thing t…
Work Over Net is a new and very powerful collaboration product. With its new easy interface it is becoming very competitive to other similar products like webex and office interactive. WON 2010 have the standard business tools needed for multi-offic…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

746 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now