parsing CMSInlineControl

Rita Mikusch asked on September 11, 2020 10:55

HI, this is in Kentico 11.

My webpart has a field which contains some HTML: DisplaySuccess

In the c# code behind, I display that field on the webpage as follows: DisplayContent.Text = DisplaySuccess;

That html includes this CMSInlineControl ... but it does not get parsed as a CMSInlineControl ... this inline control is supposed to display a form ... how do I force it to do that?

<p><object codetype="CMSInlineControl" style="display: none" type="widget"><param name="name" value="BizForm" /><param name="widget_displayname" value="On-line+form" /><param name="bizformname" value="MyFormName" /><param name="width" value="" /><param name="height" value="" /></object></p>

Ugh, this is making me lose my sanity, if anybody has any ideas, I'd appreciate it. Thank you.

Correct Answer

Juraj Ondrus answered on September 11, 2020 11:17

Assuming you are using portal engine.
This topic was already discussed few times and there is also an old KB article available, which should get you on the right track (some APIs might have been changed since, but the idea is the same). Here are some links:
KB Article
Discussion 1
Discussion 2
I hope it will help.

0 votesVote for this answer Unmark Correct answer

Recent Answers


Liam Goldfinch answered on September 11, 2020 11:17

Hi

Maybe you can try using ControlsHelper.ResolveDynamicControls(this); in your code behind for your webpart.

Or even better, wrapping where you are rendering the HTML in a placeholder and pass that into the helper method.

1 votesVote for this answer Mark as a Correct answer

Rita Mikusch answered on September 11, 2020 18:47

Thank you so much for the help. I just couldn't think of the right thing to search/google for, so I couldn't find that information.

(I guess it didn't help that it was 2 in the morning here!)

0 votesVote for this answer Mark as a Correct answer

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