Microsoft Developer Network > Forums Home > Commerce Server Forums > Commerce Server 2009 > SPAdsListWebPart - where in SDK in order to change presentation layout
Ask a questionAsk a question
 

AnswerSPAdsListWebPart - where in SDK in order to change presentation layout

  • Friday, November 06, 2009 5:17 PMPedro Mateus Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Discount Ad Web Part doesnt has in settings a xslt link like the other WPs, i needed to change the layout of this WP, i installed the SDK but i cant find SPAdsListWebPart. Is the source code avaliable?

    Tks

    http://pontodepartilha.blogspot.com

Answers

  • Sunday, November 08, 2009 9:43 PMLewisBenge Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hi Pedro,

    I think you'll find the XSLT option is a default option across all web-parts, and in this instance does not actually affect the ad webpart. Ads HTML are generated based on templates supplied into the Marketing Sub-System. This can be administrated via the marketing manager, whereby you can add new adds.

    If you wish to customise the ouput HTML you will need to do this via the marketing manager administration API, by writing a custom script to do so.

    The actual webpart functionlity quite simply passes in some parameter to the CSF, which resturns HTML to be rendered.  You can find this file within the SDK in the following location:

    CommerceSharePointExtensibilityKit\UI\Marketing\Marketing.csproj and you will find the logic within the AdsListPresenter.cs class

    Let me know if you need to know anything else.

    Thanks,
    Lewis
    Follow Me on Twitter: @LewisBenge Or check out my blog: http://www.geekswithblogs.com/pointtoshare/
    • Proposed As Answer byLewisBenge Sunday, November 08, 2009 9:43 PM
    • Marked As Answer byPedro Mateus Tuesday, November 10, 2009 4:14 PM
    •  

All Replies

  • Sunday, November 08, 2009 9:43 PMLewisBenge Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hi Pedro,

    I think you'll find the XSLT option is a default option across all web-parts, and in this instance does not actually affect the ad webpart. Ads HTML are generated based on templates supplied into the Marketing Sub-System. This can be administrated via the marketing manager, whereby you can add new adds.

    If you wish to customise the ouput HTML you will need to do this via the marketing manager administration API, by writing a custom script to do so.

    The actual webpart functionlity quite simply passes in some parameter to the CSF, which resturns HTML to be rendered.  You can find this file within the SDK in the following location:

    CommerceSharePointExtensibilityKit\UI\Marketing\Marketing.csproj and you will find the logic within the AdsListPresenter.cs class

    Let me know if you need to know anything else.

    Thanks,
    Lewis
    Follow Me on Twitter: @LewisBenge Or check out my blog: http://www.geekswithblogs.com/pointtoshare/
    • Proposed As Answer byLewisBenge Sunday, November 08, 2009 9:43 PM
    • Marked As Answer byPedro Mateus Tuesday, November 10, 2009 4:14 PM
    •  
  • Tuesday, November 10, 2009 4:14 PMPedro Mateus Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    thks, i am unable to test it right now but will mark it has ansered! :)
    http://pontodepartilha.blogspot.com