You have an ability to add content blocks with arbitrary static or dynamic text to any page within DNP Portal. How to add completely new pages into DNP Portal you can find in this guide: Adding Custom Pages into DNP Portal
In this guide we assume that you want to add a custom content block into existing portal page (standard one or just created).
Starting from DNP 2.0.2 a new "Text/HTML" module has been added allowing to place arbitrary static or dynamic text on any page.
In order to add custom text/HTML content:
1. Open "App_Data\DotNetPanel_Pages.config" for editing in any suitable text editor, e.g. notepad.
2. Locate required <Page> element and add new <Module> element into desired <Content> pane:
...
<Content id="ContentPane">
<Module moduleDefinitionID="TextHTML" title="Test Text Module" container="Clear.ascx" roles="Administrator,Reseller">
<ModuleData>
<Content resourcekey="" template="true">
<![CDATA[<div class="Normal">Hello #user.FirstName#!</div>]]>
</Content>
</ModuleData>
</Module>
</Content>
...
<ModuleData> element of "Text/HTML" module should contain the following allowed data:
- Content element - describes the text content that should be displayed in the module. Text content should be placed inside <Content> element. If there are HTML tags within the content it's recommended to use CDATA section in the form <![CDATA[ .... any text goes here ]]>.
- resourcekey attribute - optional attribute that allow to pull module content from DNP shared resources. If this attribute is not empty module content defined in this file will be ignored and DNP will try to lookup the content in "App_GlobalResources\DotNetPanel_SharedResources.ascx.resx" file by "ModuleContent.<resourcekey_value>" key.
- template attribute - if true module content will be evaluated as DNP template that allow you to place dynamic content specific to current user and space. You can use the same template variables as in account and space summary information templates. Please, see this page for more info regarding template variables: Changing Account Mail Templates. Default value of this attribute is false. To increase Portal performance do not set this attribute to true if you are not going to use template variables inside module content.
3. Save "DotNetPanel_Pages.config" file and exit the editor.