locked
Manipulate Show Pages on navigation setting using CSOM RRS feed

  • Question

  • Hi All,

    How to update Show Pages property on navigation settings(AreNavigationSettings.aspx page) using Client object model. 


    Rajasekar A.C

    Sunday, July 13, 2014 1:43 PM

Answers

  • Finally I was able to achieve using the below code:

                    web.AllProperties["__CurrentNavigationIncludeTypes"] = "3";
                    web.Update();

                    clientContext.ExecuteQuery();

    Using the above code I am able to update Show Pages and Show Sites property using CSOM.


    Rajasekar A.C

    • Marked as answer by star.wars Sunday, July 20, 2014 4:38 PM
    Tuesday, July 15, 2014 3:32 PM

All replies

  • Hey

    Take a look ate this forum: 

    https://go4answers.webhost4life.com/Example/accessing-navigation-menu-item-object-188033.aspx

    Thanks

    Sunday, July 13, 2014 2:15 PM
  • Hi Fabio,

    I have to achieve using client object model.


    Rajasekar A.C

    Sunday, July 13, 2014 3:25 PM
  • Below link shows you how to do navigation settings using JSOM. You can modify the code to use .NET client side object model if you want to achieve it using CSOM.

    http://www.vrdmn.com/2013/03/sharepoint-2013-change-navigation.html


    Geetanjali Arora | My blogs |

    Sunday, July 13, 2014 6:39 PM
  • That link does not share how to update "Show Pages" property. Is it achievable? That is the requirement for me as well.

    pankaj bose

    Tuesday, July 15, 2014 3:09 PM
  • Finally I was able to achieve using the below code:

                    web.AllProperties["__CurrentNavigationIncludeTypes"] = "3";
                    web.Update();

                    clientContext.ExecuteQuery();

    Using the above code I am able to update Show Pages and Show Sites property using CSOM.


    Rajasekar A.C

    • Marked as answer by star.wars Sunday, July 20, 2014 4:38 PM
    Tuesday, July 15, 2014 3:32 PM
  • Thanks. Let me try this out.

    pankaj bose

    Tuesday, July 15, 2014 4:32 PM
  • Thanks. That worked.

    pankaj bose

    Friday, July 18, 2014 6:38 AM