dynamic datas shown on the left menu from xml field

已答覆 dynamic datas shown on the left menu from xml field

  • 27 marca 2012 15:11
     
     

    Hello

    I would like on the left menu of my masterpage to have a dynamic information which is changing every 1mn and which coming from an xml database. Is it possible also to populate this xml database in sharepoint ?

    Thanks a lot,

Wszystkie odpowiedzi

  • 28 marca 2012 13:12
     
     Odpowiedz

    Hi,

    You could either create a Web Part, User Control or other web component to expose that data and put it in your Master Page located in the left menu section.

    For exposing external data (information in external datasources) you have the BCS (Business Connectivity Services) which is pretty awesome. Take a look at this article for creating your own Web Part tht is working toward and external data source: http://tz.nu/H0iSpT

    For more information about BCS, take a look here: http://tz.nu/GZPDzq

    Of course you don't have to use BCS if it is too much work. Then simply do your own Web Part talking to the XML stream and populate your Web Part with the data. Done.

    Hope this helps.

    Cheers,


    Tobias Zimmergren
    Microsoft MCP, MCTS, MCT, MVP (SharePoint)
    Blog: www.zimmergren.net
    Twitter: twitter.com/zimmergren
    Corporate site: www.tozit.com

  • 28 marca 2012 13:59
     
     Odpowiedz
    if you will implement it as web part or user control - you have to implement data fetching logic and UI by yourself. I would suggest to create custom site map provider - which is more suitable in my opinion for such things (Sharepoint's own navigation is built on top of them). In this case you have to implement only data fetching, while for UI you will still be able to use OTB AspMenu control (I wrote about it some time ago: http://sadomovalex.blogspot.com/2010/02/basics-of-navigation-in-sharepoint.html). And as always for simple task I suggest to consider simple tools like ado.net, linq 2 xml or custom data providers for accessing external data source (depends on exact type of the data source) instead of using of bcs. For this task it seems like that you may spend more time for configuring bcs, other then doing exact work.

    Blog - http://sadomovalex.blogspot.com
    CAML via C# - http://camlex.codeplex.com