Custom Module - missing button "New Element"

Stefan Sturm asked on March 8, 2016 10:17


i've created the custom module "Company overview" exactly as described in the documentation two times to be shure i did't made any misstakes but it alwasy ends up in the same situation.

After creation i'm not able to create a new DB entry simply becaus i'm missing the "New Element" button in the application.

This is not the first time i had such a problem - the same problem exists on the product version application but this doesnt matter at the moment.

I'm working with Kentico v8.1.9 and currently i have no idea what i can do to fix this.


For testing reasons I manually created an interface for custom modules and from my point of view it looks like the header action is missing.

Please help


Recent Answers

Trevor Fayas answered on March 8, 2016 15:35

Can you post some of your code so we can take a look?

0 votesVote for this answer Mark as a Correct answer

Stefan Sturm answered on March 8, 2016 15:50 (last edited on March 8, 2016 15:50)

Hey Trevor,

there is no code. I just added the custom interface to see what happens. Just for testing purposes and their i have the "New office" button.

 // Creates and adds the "New office" button as a header action
        HeaderAction newOffice = new HeaderAction
                Text = GetString("New office"),
                RedirectUrl = "~/CMSModules/CompanyOverview/NewOffice.aspx"

But again the custom interface was only for testing reasons created. When i follow the documentation as linked above i end up in the situation with the missing button "New element".

So when i whant to do the following:

Office editing element

  1. Select Company overview in the UI element tree.
  2. Click New element ().
  3. Set the following properties for the element:

    • Display name: Edit office
    • Code name: EditOffice (Important: The code name of elements for editing objects under listings must always start with the Edit keyword)
    • Module: Company overview
    • Page template: New / Edit object
  4. Click Save

i cant do it ^^

The only code i've wrote (pasted) was the default.xml

<?xml version="1.0" encoding="utf-8" ?>
        <action name="edit" caption="$General.Edit$" fonticonclass="icon-edit" fonticonstyle="allow" />
        <action name="#delete" caption="$General.Delete$" fonticonclass="icon-bin" fonticonstyle="critical" confirmation="$General.ConfirmDelete$" />
        <column source="OfficeDisplayName" caption="Office name" wrap="false" localize="true">
            <filter type="text" size="200" />
        <column source="OfficeAddress" caption="Address" width="100%" />    
        <key name="DisplayFilter" value="true" />
0 votesVote for this answer Mark as a Correct answer

Trevor Fayas answered on March 8, 2016 18:39

The HeaderAction is a control that's on one of Kentico's master pages for it's internal systems (ex ~/CMSMasterPages/UI/SimplePage.master). Now i think i know where you're getting at. I've run into a similar issue.

The Inherited class often has reference to the HeaderActions object, but you need the control to render it (and possibly overwriting logic)

The SimplePage.master's has this control, and in the back an override. You will probably have to do the same or inherit the SimplePage.master

<cms:ObjectEditPanel ID="actionsElem" runat="server" IsLiveSite="false" />

/// <summary>
/// HeaderActions control.
/// </summary>
public override HeaderActions HeaderActions
        if (base.HeaderActions != null)
            return base.HeaderActions;
        return actionsElem.HeaderActions;
0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.