DotNetPanel Manuals Center, Guides, "HOW TO" On-Line Library
Adding Custom Pages into DNP Portal Edit Page Page Info
Last edited Tue, 09 Jan 2007 08:56:13 GMT by Feodor Fitsner, revision 4

DNP Portal has a great possibility to add new custom pages. It may be a user-defined page with some support instructions or page containing the links to company web site or help desk system.

In order to add new custom page you should do the following:

1. Open "App_Data\DotNetPanel_Pages.config" file for editing in any suitable text editor, e.g. notepad.

Please store modified file in the safe place before any DNP upgrade. After upgrade merge your file with an updated one.

You can see all DNP pages defined in <Page> elements. To create a navigation hierarchy <Page> elements can be nested within each other with the help of containing <Pages> element.

2. Add a new <Page> element. If you want to add a page to the root menu you should add new <Page> element in the root <Pages> node; otherwise find the required "parent" <Page> element and add your page there.

Page element has the following attributes:

  • name - page identifier. It should be unique across all "*_Pages.config" documents and should not contain spaces.
  • roles - comma-delimited list of DNP roles that can access this page. Allowed role identifiers:
    • Administrators - DNP administrators
    • Resellers - DNP resellers
    • Users - DNP users
    • ? - all unauthenticated (anonymous) users
    • * - all authenticated and unauthenticated users
  • enabled - if false the corresponding page menu item is displayed in DNP navigation menu but it can not be clicked (you can't navigate to this page). Default value is true.
  • hidden - if true the corresponding page is hidden in DNP navigation menu, but still you can navigate to this page by its direct URL, e.g. http://cp.mysite.com/default.aspx?pid=MyHiddenPage. Default value is false.
  • skin - the name of skin user control to use for this page. Skin user controls are placed in "App_Skins\<Theme>" folder where <Theme> is the name of currently selected visual theme. Skins define the number and names of content placeholders used to place page modules. If this attribute is omitted the default skin defined in <PortalSkin> element of "App_Data\SiteSettings.config" file will be used.
  • url - redirection URL. If this attribute is specified page menu item will be rendered as a redirection link and all contents of <Page> element will be omitted.

In order to show human-readable name of the page in the navigation menu instead of its identifier you should add both page name and page title into "App_GlobalResources\DotNetPanel_Pages.ascx.resx" as following:

PageName.<page_name> = Page Name
PageTitle.<page_name> = Page Title

where <page_name> is page identifier.

3. Add <Content> element under created <Page> element.

<Content> element acts as a placeholder for <Module> elements and it has the following attributes:

  • id - content pane identifier. This should be the ID of one of the content placeholder controls defined in skin user control. In the most DNP skins the following content panes are defined:
    • LeftPane - left column
    • ContentPane - center column
    • RightPane - right column

4. Add required <Module> elements into <Content> element.

<Module> element describes a part of the page located at the specified pane (placeholder),  wired by specified container and displaying pre-defined DNP module.

<Module> element has the following attributes:

  • moduleDefinitionID - the ID of module definition. Module definition is a set of user controls and is described in "App_Data\DotNetPanel_Modules.config" file. You may select to place any pre-defined DNP module by specifying its respective ID. If you want to place an arbitrary Text/HTML please refer to this page: Adding Custom Content Modules into DNP Portal Pages
  • title - module title (if supported by module container). If module title should be localized you should add its localized value to "App_GlobalResources\DotNetPanel_Modules.ascx.resx" file.
  • container - the name of container user control to use for this module. Container user controls are placed in "App_Container\<Theme>" folder where <Theme> is the name of currently selected visual theme. Containers define the "border" around the module content, they contain placeholders for module icon, title and content. If this attribute is omitted the default container defined in <PortalContainer> element of "App_Data\SiteSettings.config" file will be used. If you don't want to outline the module with the container you may specify "clear.ascx" container.

5. Save "DotNetPanel_Pages.xml" file and exit from text editor.

6. If you want to place an arbitrary Text/HTML module please refer to this page: Adding Custom Content Modules into DNP Portal Pages.

Examples

New "About Us" page below existing "Home" root menu element 

...

<Page name="Home" roles="Administrator,Reseller,User" skin="Browse3.ascx">
   <Content id="LeftPane">
      ...
   </Content>
   <Content id="ContentPane">
      ...
   </Content>
   <Content id="RightPane">
      ...
   </Content>

   <Pages>
      <Page name="AboutUs" roles="Administrator,Reseller,User" skin="Browse3.ascx">
         <Content id="ContentPane">
            <Module ...>
               ...
            </Module>
            ...
         </Content>
      </Page>
   </Pages>

</Page>

...

New root "Support" menu element and new "Help Desk" page below it

<Pages>

...

<Page name="Support" roles="Administrator,Reseller,User" enabled="false">
   <Pages>
      <Page name="HelpDesk" roles="Administrator,Reseller,User">
         <Content id="ContentPane">
            <Module moduleDefinitionID="TextHTML" title="HelpDesk">
              <ModuleData>
                <Content template="true">
                  <![CDATA[<div class="Normal">Hello #user.FirstName#! You can use the following url to access Help Desk application: 
                     <a href=http://support.company.com>Help Desk System</a>
                  </div>]]>
                </Content>
              </ModuleData>
            </Module>
         </Content>
      </Page>
   </Pages>

</Page>

...

</Pages>

 New root menu item redirecting to Google.com

<Pages>

...

<Page name="GoToGoogle" roles="Administrator,Reseller,User" url="http://www.google.com">
</Page>

...

</Pages>

Tags (0)
No tags have been added yet.
Comments (0)
No comments have been added yet.
Attachments (0)
No page attachments found.