More in this section

Forums / Developing with Sitefinity / Exclude pages per navigation control

Exclude pages per navigation control

5 posts, 0 answered
  1. Levi
    Levi avatar
    3 posts
    Registered:
    26 Aug 2008
    26 Aug 2008
    Link to this post
    Hello,

    I would like to exclude a page from my sites navigation, but not from all navigation, so I don't think I can set "Show in navigation" to "No".

    Can I exclude pages from navigation per control?  For example, when using a SiteTabStrip control, can I tell it to exclude specific pages?
  2. Levi
    Levi avatar
    3 posts
    Registered:
    26 Aug 2008
    26 Aug 2008
    Link to this post
    I accomplished what I needed by adding a new property to SiteTabstrip called "ExcludePage".  This works, and even shows up in the property editor.  So, I can now at least exclude a single page per SiteTabStrip control instance.

    I would like to extend this further so that I can add a list of pages from the property editor.  How would I go about adding this functionality to the SiteTabstrip so that I can edit a list of items from the property editor?

    By the way, SiteFinity is a very impressive product!

    Thanks!
  3. Ivan
    Ivan avatar
    478 posts
    Registered:
    16 Jun 2015
    28 Aug 2008
    Link to this post
    Hi Levi,

    Thank you for the kind words.

    What you will need to do is following:
    1. Implement a public property which will be a string array or generic list - let's call it ExcludedPages

    2. Since Sitefinity can persist only string values, you will need to implement a TypeConverter which will convert your array to string and back (e.g. string representation of array can be semi-colon delimited list).
    You can find more about TypeConverter class here:
    http://msdn.microsoft.com/en-us/library/system.componentmodel.typeconverter.aspx

    3. Implement TypeEditor to provide a user friendly way for choosing which pages to exclude. You can find more information as well as the sample code for TypeEditor implementation here:
    http://blogs.sitefinity.com/Ivan/Post/07-05-24/working_with_complex_properties_in_custom_public_controls_webtypeeditor_.aspx

    I am sorry that I was not able to provide you with some more streamlined resources and samples at this moment, but the good news is that we are currently working exactly on these samples and we hope to publish them in the Developer Manual over the next two weeks. I will post the announcement on my blog when the resources are ready, so you can check blogs.sitefinity.com from time to time to see if samples are available.

    I hope you'll find this information helpful. Let us know if there is anything else we can do for you.

    Regards,
    Ivan
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  4. Levi
    Levi avatar
    3 posts
    Registered:
    26 Aug 2008
    28 Aug 2008
    Link to this post
    Thank you for the information.  It was very helpful! 

    I am not worried that you didn't provide streamlined resources and samples -- your information will get me started in the right direction.

    Thanks again!

  5. Ivan
    Ivan avatar
    478 posts
    Registered:
    16 Jun 2015
    28 Aug 2008
    Link to this post
    Hi Levi,

    Always glad to be able to help. Let us know if there is anything else we can do for you.

    Greetings,
    Ivan
    the Telerik team

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