Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > How to allow user to edit something stored in Page Content from within a dialog window. View modes: 
User avatar
Certified Developer 8
Certified Developer 8
Jiveabillion - 8/15/2011 9:34:17 AM
   
How to allow user to edit something stored in Page Content from within a dialog window.
I have made a widget that inherits from the Editable Text web part to allow my users to place editable text widgets anywhere they are able to place widgets. This will also allow them to easily move content around the page and add more widgets above or below their content while still being able to edit their text content in the context of the page.

This all works just fine, but they want to also have the option to edit the text content in a dialog window when said content is much much larger than the editable area given to them on the page by the widget.

I know that the content for EditableWebParts is stored in DocumentContent and not in the DocumentWebParts column of the Document objects. I don't see any way for me to add a field for this content in the form for the WebPart or Widget.

How can I add a field for the widget's content in DocumentContent in the dialog window for editing the widget's properties?

User avatar
Member
Member
kentico_michal - 8/16/2011 1:58:30 AM
   
RE:How to allow user to edit something stored in Page Content from within a dialog window.
Hello,

To be honest, I am not completely sure what you want to accomplish.

But, if I am getting it right you want to enable properties that allow users to specify width and height of the Editable text widget so that they could change the size if the content gets larger. Is that right?

If so, please go to Site manager -> Development -> Widgets -> edit Editable text widget -> Properties -> enable Display attribute in the editing form property for DialogWidth and DialogHeight property.
As a result, there will be two properties in Editable region widget’s properties for changing the size of the dialog.

If it is not what you want, could you please describe me in more detail what you want to achieve? Thank you.


Best regards,
Michal Legen

User avatar
Certified Developer 8
Certified Developer 8
Jiveabillion - 8/16/2011 10:57:23 AM
   
RE:How to allow user to edit something stored in Page Content from within a dialog window.
This is not at all what I want to achieve.

I want the editors to have the option of editing the content of the editable text widget both on the page and in a dialog window so that they can choose either way they want at any time.

Do you understand what I mean?

User avatar
Certified Developer 8
Certified Developer 8
Jiveabillion - 8/16/2011 12:42:48 PM
   
RE:How to allow user to edit something stored in Page Content from within a dialog window.
Ok, so I figured out a way to do it, but it required me to edit the WidgetProperties.ascx.cs file.

I added a dummy field to my editable content control called "WidgetContent" then I changed WidgetProperties.ascx.cs to load content for this field from the PageContent and to save it back to PageContent.

Now I can edit the content in the on the page or in the widget properties dialog window. It works beautifully.