Adjust webparts to allow html markup?

K Fisher asked on February 2, 2015 10:52

Hi, am developing in Kentico 8.1, and wondered if its possible to enable web parts such as the generic Kentico "News List" to accept html markup and render the results, rather than the html markup?

E.g. Setting title to "A News Item ®

Would show a registered mark in superscript (rather than the markup to produce such an effect SUPERSCRIPT TAG, CODE FOR REG MARK, CLOSE SUPERSCRIPT TAG.

I assume if its possible to change the way content entered in webparts is rendered it would work across the board on other webparts?

Kate

Recent Answers


Brenden Kehren answered on February 2, 2015 13:50

That text is most likely in the content before or content after property of the webpart, so yes you can modify that text. The transformation text is rendered for each item which can be modified as well.

0 votesVote for this answer Mark as a Correct answer

K Fisher answered on February 2, 2015 15:40

Many thanks for your super speedy response Brenden, in this instance Ive taken a smart search result transform that includes the following to print out the title of a news article (below):

What might I add around Eval("Title") to make html tags within Title render as HTML commands rather than print the constituent characters?

Appreciate any thoughts.

Kate

Excerpt below (shows the line printing out the title of a news item) - - - - - - - - - -

<%-- Search result title --%>
<%#SearchHighlight(HTMLHelper.HTMLEncode(CMS.ExtendedControls.ControlsHelper.RemoveDynamicControls(DataHelper.GetNotEmpty(Eval("Title"), "/"))), "", "")%>
...

0 votesVote for this answer Mark as a Correct answer

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