Widget display in editor

Misty Garrick asked on November 9, 2018 18:26

Is there a way to format the display of a widget in the CMS editor? I have a widget that doesn't really have any static HTML in it (code below). So, when a user adds the widget to the page, it doesn't look like there's anything there.

I did add the "kenticoWebPartMessage" literal with text "[MY WIDGET NAME]". I toggle its display based on PortalContext.ViewMode, but that seems a little clunky. Is there a better way to give the widget a visual presence to the content editor?

<asp:Literal runat="server" ID="kenticoWebPartMessage" Visible="false" />

<asp:Repeater runat="server" ID="Legislators" OnItemDataBound="Legislators_ItemDataBound">
    <ItemTemplate>
        <p>
            <strong><asp:Literal runat="server" ID="LegislatorTypeAndDistrict" />:
                <asp:Literal ID="LegName" runat="server" />
            </strong>


            <asp:Literal ID="LinkLabel" runat="server" />
            <asp:HyperLink runat="server" ID="LegislatorLink" />

            <asp:Literal ID="EmailLabel" runat="server" />
            <asp:HyperLink runat="server" ID="LegislatorEmail" />
            </p>
    </ItemTemplate>
</asp:Repeater>

Recent Answers


Rui Wang answered on November 9, 2018 22:00

Widget is essentially a web part (user control), it cannot be resolved in text editor. Thus an object is placed in the text editor to hold its spot.

0 votesVote for this answer Mark as a Correct answer

Misty Garrick answered on November 9, 2018 22:17

Thanks. I see that there's a box with a light gray line around it. However, as a user, it seems really hard to tell without clicking into the widget what it is. It seems like like it would be easy to try to add the widget multiple times. So, I'm looking for something behind how it's appearing now to make it easier to see which widgets are on the page.

0 votesVote for this answer Mark as a Correct answer

Rui Wang answered on November 9, 2018 23:16

Misty, there is the preview button toward the upper left corner of the Page application. If you have workflow enabled, editor can save the change they made and preview the page without publish the page. Widget would be resolved in preview.

0 votesVote for this answer Mark as a Correct answer

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