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

Forums / Developing with Sitefinity / Custom Page Properties

Custom Page Properties

3 posts, 0 answered
  1. Mike
    Mike avatar
    208 posts
    Registered:
    10 Dec 2007
    20 Oct 2008
    Link to this post
    Hi,

    I gathered from Gabe's blog post from a year ago that custom page properties are not possible in Sitefinity.  I'm  hoping you have a workaround for my specific situation.

    I want to implement a "hide from left navigation" property, so that I can check for the value of this property when building my left nav menu, and set display=none.  Unfortunately, when I select "hide from navigation", the node is removed from the site map, and because of that, the left nav won't expand to the parent page.  I'd like the ability to keep a node in the sitemap, but optionally not display it in the navigation. 

    One of the cool features in WSS 3.0 is the fact that there is a persistance store for every site object.  That is, you can store things in the property bag for a page, site collection or web application.  In SItefinity, there doesn't seem to be any way to associate custom properties with a page.   I've thought about using a custom control that would store these properties, but I'm not sure if that's the appropriate way to do it.

    Thanks in advance!
    Mike
  2. Mike
    Mike avatar
    208 posts
    Registered:
    10 Dec 2007
    20 Oct 2008
    Link to this post
    For the moment, I've implemented a fix for the SitePanelBar that compares the URL of the current page's parent with the current node item in the PanelBar, and sets the node item to be selected if they're the same.  That way, if I'm on a hidden child of a page in the sitemap, that page in the sitemap shows up as selected, so that the navigation context is maintained, and the SitePanelBar doesn't collapse.

    Unfortunately, this means I can't have a page that's hidden from navigation and also hidden from the left nav, which may be ok for this project.

    But I'd still like to know how I can persist a custom property to a page, so that I can selectively turn this on or off, depending on the value of the property.

    Something like:

    CmsUrlContext.Current.Properties["HideFromLeftNavigation"]


    In version 3.5 can you define custom metaproperties for pages, as well as modules based on generic content?  If not, this would be a great feature for a future version of Sitefinity!  A lot of other content management systems have this.

    Regards,
    Mike Sharp
  3. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    24 Oct 2008
    Link to this post
    Hi Mike,

    Yes, Mike, I totally agree with you. We think for something like this, to be more precise - we would like to implement the metafields concept for pages also. We didn't started with this implementation yet, but have it mind.

    Unfortunately your option here is to check in user control(which holds the navigation control) if this is the page you want to hide.

    Regards,
    Georgi
    the Telerik team

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