14 YEARS AGO

Tweaks: Editable text with default value

The following steps will show you how to clone the "Editable text" web part and change it's code to display default texts (e.g. {%DocumentName%} macro for the title) for your editors.

The following steps will show you how to clone the "Editable text" web part and change it's code to display default texts (e.g. {%DocumentName%} macro for the title) for your editors.

Step 1: Clone the "Editable text" web part:



Step 2: Locate the code behind (~\CMSWebParts\Text\editabletextwithdefaultvalue.ascx.cs) and modify line 690 as follows:



Step 3: Add the newly created web part and fill in some default text:

default_value.png

Step 4: View the result:

result.png