Mirror page properties in SidSettingsArea plugin

 

Hi,

I have created a SidSettingsArea plugin for user profile information which creates a page for each user and stores the values in the page properties (this is done for ease of searching), so really the plugin is basicaly acting as a mirror to the edit page for the user profile template.

 This has been easy enough so far as it has mainly been text boxes, however now we have added a coupld of the more complex property types, and was wondering if there was a way to use the controls from the property edit screen within my admin interface? or will I have to make my own versions?

Many thanks

Matt

#28092 Feb 19, 2009 13:42
  •  
    You can ask a property for it's WebControl and set it into edit mode.
    IPropertyControl control = PropertyControlClassFactory.Instance.
    CreatePropertyControl(property);
    if (control != null)
    {
    control.PropertyData = myPage.Property["YourProperty"];
    control.Properties = myPage.Property;
    control.RenderType = RenderType.Edit;
    myPanel.Controls.Add((Control) control);
    }

    It is also possible to put your PropertyDataControl subclass in your aspx/ascx file as a web control and assign the values above.

     

    #28093 Feb 19, 2009 14:45
  •  
    That sort of works, but it doesn't seem to like anything that needs to register a script like a file or link selector.
    #28095 Feb 19, 2009 15:33
  •  
    The XHtmlEditor assumes a lot about it's sorrundings. Like that is is placed on a subclass of PageBase, etc.
    #28361 Mar 05, 2009 11:47