+1-888-365-2779
Try Now
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

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:
    25 Nov 2016
    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