More in this section
Forums / Designing with Sitefinity / How to programatically get that the page is in navigation or not

How to programatically get that the page is in navigation or not

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
2 posts, 0 answered
  1. eraashishgupta
    eraashishgupta avatar
    50 posts
    Registered:
    26 Nov 2008
    19 Jan 2009
    Link to this post
    How to programatically get that the current page is shown in naviagtion or not.
    I want to perform some actions if the page is not in navigation.
    So is there a property to know whether a given page is in navigation or not.

    Thanks
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    19 Jan 2009
    Link to this post
    Hi,

    Here is the code that will return the page Name, if it is navigable or not.

     CmsManager manager = new CmsManager(); 
            foreach (ICmsPage page in manager.GetPages()) 
            { 
                //check whether the page is navigable 
                if (page.Navigable) 
                { 
                //return the page name 
                    Response.Write("This page is navigable" + page.Name + "<br />"); 
                } 
            } 

    I hope this helps.

    Greetings,
    Ivan Dimitrov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
2 posts, 0 answered