Search code examples
webwidgettitleektron

Ektron Widgets: Wrong widget being dropped on page, doesn't match the one I selected in the toolbar


I have a really weird issue with Ektron. A while back, I created a widget called NehgsTooltip. It worked fine. I later created another widget called NehgsLogin. Now, when I try to add NehgsTooltip to a page, the widget that appears on the page is called NehgsLogin.

The widget in my header has the right name 1

but when it gets dropped on the page the name changes 2

When I try to edit the widget, when I click the "choose" button, choose menu doesn't open. I'm not sure if this is because NehgsLogin doesn't have any options. However, when I manually enter the needed content title and ID and save it, the widget works as it's supposed to.

3

I can't figure out if there is an error happening in Ektron, or if the NehgsTooltip has just been misnamed somewhere. I checked the .ascx and .cshtml files and nowhere in there is the widget being names "NehgsLogin" (the phrase doesn't exist in any of those documents). I also checked the widget in settings, and both Widget Title and Widget Label are set correctly. What would be causing the widget to load as NehgsLogin, and is it actually loading the wrong widget, or is it just giving it the wrong title?


Solution

  • The title of the widget that you see in the Pagebuilder toolbox comes from the widget settings in the workarea. The title that is displayed on the widget itself is usually set in code behind like this:

    protected void Page_Init(object sender, EventArgs e)
    {
    ...
        _host = Ektron.Cms.Widget.WidgetHost.GetHost(this) as Ektron.Cms.PageBuilder.WidgetHost;
        _host.Title = "Archive Widget";
    ...
    }
    

    So I would check those two locations to ensure they are correct.

    I see you are using CSHTML, and in another SO question you mention MVC, please not Ektron is not an MVC application.