More in this section

Forums / Developing with Sitefinity / How to add new Services.ContentService

How to add new Services.ContentService

5 posts, 1 answered
  1. thomas3577
    thomas3577 avatar
    22 posts
    Registered:
    18 Feb 2007
    16 Jan 2010
    Link to this post
    I do not if that's possible. But i would like to add a new ContentService :-)

    Telerik.Cms.Engine.Services.ContentService.GroupChangeCategory()

    This is for a new Group Operation for Librabies, to set or change the Category for Seleted Items.

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    17 Jan 2010
    Link to this post
    Hello thomas3577,

    It would not be possible to inherit from Telerik.Cms.Engine.Services.ContentService and create a new web.method. I suggest that you should create your own WebService with WebMethods and call them where you want.

    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. thomas3577
    thomas3577 avatar
    22 posts
    Registered:
    18 Feb 2007
    19 Jan 2010
    Link to this post
    Thanks for this Tip. I've never worked with WebMethods. I have tried to create one and i think that might work. I have add the asmx-File to the ScriptManager in Admin.Master. The Method and Namespace is "Klicklupp.ContentServices.SetCategory([any Values]).

    The JavaScript Function:
    function SetCategoryForSeletedItems() {  
      ...  
      Klickflupp.ContentServices.SetCategory(...);  

    or

    function SetCategoryForSeletedItems() {     
      ...     
      PageMethods.Klickflupp.ContentServices.SetCategory(...);     
    }   

    I tested both. But the Errormessage is always "Klickflupp is not defined"
  4. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    19 Jan 2010
    Link to this post
    Hello thomas3577,

    Thank you for getting back to us.

    Could you, please take a look at the following blog posts sampling the use of Web Service (.asmx) and WCF Service (svc AJAX enabled web service):
    Use the Content Manager API in a Web Service
    Integrate rating with Generic Content based modules
    Enable loading of CMS pages through an AJAX Web Service

    Please make sure that all name spaces match.
     
    Kind regards,
    Radoslav Georgiev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
    Answered
  5. thomas3577
    thomas3577 avatar
    22 posts
    Registered:
    18 Feb 2007
    21 Jan 2010
    Link to this post
    Thanks!

    Now, it works! I can set the Category for seleted Picture in the Libraries. :-)
Register for webinar
5 posts, 1 answered