Pergunta

I'd like to build a content rotator web part for SharePoint 2010 to display list information. I'm working with the ever-popular AnythingSlider. A couple of questions:

  • How would I let the page author set the AnythingSlider's defaults, such as buildArrows, width, height, and other properties from the web part edit dialog?
  • Is this a project best done in Visual Studio as a visual web part?
  • I'm going to create it as a content query web part with a custom ItemStyle.xsl file. This will then contain the AnythingSlider code. It might pull data from a list in another site, and therefore the CQWP choice. Is this a good approach?

Also, if you know of a good (and free) SharePoint content rotator, please advise. I'm looking for something that can handle any kind of content, thus the AnythingSlider. Thanks :)

Foi útil?

Solução

Here's an example of a content slider based on an announcements list using jQuery, SpServices, and jShowoff. It's an example of what can be done client side.

Outras dicas

Since you're working with the Anythingslider, which is jQuery-based, you could also consider using jQuery all the way. My SPServices library would allow you to pull list items easily using SharePoint's Web Services. Storing that content in different sites would pose no problem, as long as your permissions were set correctly.

You could store both the content for the rotator and the settings in lists, which your user could update easily. I've taken this approach many times.

There's always more than one way to do things in SharePoint; it all depends on your governance and skills.

BTW, there are more image rotators available for jquery than I could possibly count - it seems to be one of the most common uses for jQuery out there.

  • choosing the CQWP is a good idea: not only from the performance point of view but also for its decoupling of UI and query
  • to provide additional configuration capabilities you might want to create a custom Web Part that inherits from the CQWP and introduces additional properties that allow to configure the content rotator
  • because you would be inheriting from the CQWP the best way would be to choose the Web Part SPI template as the starting point. If you need more explanation on this choice, read my article at http://blog.mastykarz.nl/when-use-which-web-part-template/
Licenciado em: CC-BY-SA com atribuição
Não afiliado a sharepoint.stackexchange
scroll top