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

Forums / Developing with Sitefinity / select page from site - in user control properties

select page from site - in user control properties

4 posts, 0 answered
  1. Mark
    Mark avatar
    86 posts
    Registered:
    08 Feb 2010
    23 May 2011
    Link to this post
    #region Properties
    private Guid pageId;
    private string navigateUrl;
    [UrlProperty, WebEditor("Telerik.Cms.Web.UI.DhlUrlEditor, Telerik.Cms"), Bindable(true), Category("Misc"), DefaultValue(""), Description("Pick the page the Single Contact Control is placed on")]
    public string NavigateUrl
    {
        get
        {
            return this.navigateUrl;
        }
        set
        {
            this.navigateUrl = value;
        }
    }
    [TypeConverter("Telerik.Cms.Web.UI.GuidTypeConverter, Telerik.Cms"), WebEditor("Telerik.Cms.Web.UI.DhlIdEditor, Telerik.Cms"), Category("Navigation"), DefaultValue(typeof(Guid), "00000000-0000-0000-0000-000000000000")]
    public Guid PageId
    {
        get
        {
            return this.pageId;
        }
        set
        {
            this.pageId = value;
        }
    }
    #endregion

    Using the above control in a usercontrol I can select a page from the site.
    However, this only works with one URL

    I need to do this with multiple URLs
    Is this possible?

    Thanks
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    25 May 2011
    Link to this post
    Hi ,

    You need to create a custom selector similar to this one used in SiteMenuBuilder

    http://www.sitefinity.com/blogs/ivandimitrov/ivanposts/10-02-13/sitemenu_builder.aspx

    Kind regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Mark
    Mark avatar
    86 posts
    Registered:
    08 Feb 2010
    25 May 2011
    Link to this post
    thanks Ivan

    However, i don't think this is what i need

    i just want a user control and be able to select a page from the site map when you click edit
    I can do this with one link, but not multiple


  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    25 May 2011
    Link to this post
    Hello Markus,

    This code shows how to return subset of page ids that you can resolve. Another option is using type converter and creating a more complex control with a control designer.

    All the best,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Register for webinar
4 posts, 0 answered