Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I am looking to build a News web part (Sandboxed) as we can see in below link. http://timesofindia.indiatimes.com/tech/techhome/5880659.cms

Requirement is, The News web part should contain a graphic/Image, article headline and a story introduction with a link to the entire story. This should contain links to view other articles. The graphic and highlighted article will automatically rotate among a set number of stories or upon selection. The story introduction will be displayed under the Image and displayed along with any comments and article posted date.

Any inputs on the best approach like either custom webpart or CQWP is good for these please? or if there is an existing web part which could be used could you please point to it. More details will be really appreciated!

share|improve this question
add comment

1 Answer

We could spawn a full discussion on this, but here is my take: CQWP or DVWP (or the more powerful, SharePoint 2010 specific web part XSLTListView WebPart) could do the job, you could even consider the CoreSearchResults web part. The reasoning behind choosing one or the other could be:

  1. Source of data: Single list? Multiple lists? Custom content type? Current Sub-Site, Cross Sub-Sites, or even Cross Site Collections or the whole Farm? In either cases you need to consider:
    • XSLTListView web part is easy to use with a single list or linked lists - manual process via SharePoint Designer 2010.
    • CQWP - cross sites (!webs, not site collection), also Content Type based queries, selectable fields (via slots), customizable XSLT (3 of them) - probably best bet in your case (see here for an example of how to add custom functions, such as a random function selector @ http://blog.mastykarz.nl/extending-content-query-web-part-xslt-custom-functions/)
    • CoreSearchResults - works cross site collections too, various selection possibilities - require some administration permissions and a proper Search SA configured, e.g. Search Scopes to match your needs.
  2. Customization capabilities - all XSLT based web parts enable you to customize output, some of them via browser UI (CQWP or CoreSearchResults) or via SPD 2010 (XSLTListView / DataView)
  3. Custom web parts, which could include loading jQuery library, plus a lot of plug-ins adding, which in combination with CSOM (client-side Object Model for ECMA Javascript) could give quick access to data. Also you have to consider whether Sandbox is an issue, as it does already restrict options, plus scope, e.g. only within a site collection.

Finally, it depends on your possibilities & constraints, skills, time you want to invest.

share|improve this answer
    
Thanks Marius. After considering these I have decided to go with Custom web part(Sandboxed). I am thinking of the custom web part because it is reusable and can be customized further in future if needed. I am really not familiar with CSOM so I would appreciate if you provide insight on this or I could very well go ahead with Server side code but for which I am really not sure about the implementation. I am thinking of retrieving the data from a custom list (title, image, description, URL). Who you be kind enough to provide guidance on further please? Also is there a Jquery plugin available? –  Battlesmith Aug 3 '12 at 1:37
    
Not having experience with the actual development, I would strongly suggest rely as much as possible on what is already available, rather go for CQWP (even development) and custom XSLT. Search for Heather Solomon's articles on customizing styles, and find a good jQuery plugin (search for jQUery Tools - they've got a cool plugin) which simply act on rendered HTML. Simple words - CQWP XSLt generate HTML and then jQUery plugins act only Client side after the HTML has been already generated –  C. Marius - MVP Aug 3 '12 at 16:22
    
As i had already mentioned, I am willing to go to for a custom webpart. I agree CQWP is better than custom webpart. However both need jquery/Javascript and css for styling the content generated. Thanks –  Battlesmith Aug 4 '12 at 2:56
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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