+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / MultiSite Pagemanager

MultiSite Pagemanager

4 posts, 0 answered
  1. Arnaud
    Arnaud avatar
    4 posts
    Registered:
    25 Aug 2015
    28 Oct 2015
    Link to this post

    Hello , 

    I have a function who list me all the page in a site with a Rooturl.
    But we are on a multisite instance and i don't know how to filter on a specific site . 
    I tried to change the provider for the page manager but i don't know how to do it . 

    Regards , 
    Arnaud Chatelain

  2. Sabrie Nedzhip
    Sabrie Nedzhip avatar
    534 posts
    Registered:
    30 Sep 2016
    02 Nov 2015
    Link to this post
    Hi Arnaud,

    Please try to use the sample code from the below KB article in order to filter the pages by a specific site in a multisite project:

    http://www.sitefinity.com/developer-network/knowledge-base/details/how-to-get-all-the-pages-from-a-specific-site-in-a-multisite-project

    Regards,
    Sabrie Nedzhip
    Telerik
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
  3. Arnaud
    Arnaud avatar
    4 posts
    Registered:
    25 Aug 2015
    03 Nov 2015 in reply to Sabrie Nedzhip
    Link to this post
    Hi Sabrie ,

    thank you very much.
    It works . 
    But why do you use this line ?
    pageManager.Provider.SuppressSecurityChecks = true;

    Regards , 
    Arnaud chatelain
  4. Sabrie Nedzhip
    Sabrie Nedzhip avatar
    534 posts
    Registered:
    30 Sep 2016
    05 Nov 2015
    Link to this post
    Hello Arnaud,

    By design in order to create content through the API the user should be logged in as administrator in the backend of the project.

    If you are not logged as administrator you can set the SuppressSecurityChecks property of the provider to true, in order to skip the permissions check of the provider and to be able to execute the code with anonymous identity.

    However, in your case you can comment out the lines that set the SuppressSecurityChecks property since in the sample code we query pages from the database and this code can be executed by an anonymous identity. I updated the KB article accordingly.

    Regards,
    Sabrie Nedzhip
    Telerik
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
4 posts, 0 answered