Encoded menu title

Mark Ellis asked on October 21, 2014 02:38

Hi, I'm using the Intranet Portal and have a page with an ampersand in it's title.

It renders in the top menu (CSS list menu) as "Staff stuff & policies" but the link title renders as "Staff stuff & policies" which appears when you hover over it.

Is there any way I can get the title to properly show the ampersand?

Recent Answers


Ilesh Mistry answered on October 21, 2014 08:43

Hi Mark

I would first see if the web part has any output filter settings to see if this resolves it.

If it doesn't then one approach would be is to clone the css list menu web part and amend the RenderHTML. Here is a link to a post explaining this. link text

Another approach would be to write your own web part for this, using Kentico API, however I think that would be an overkill for the bit you require.

Let us know how you get on.

Thanks

Ilesh

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on October 21, 2014 18:14

You could also use a repeater vs. the CSS List Menu webpart to render your navigation.

Another option is to uncheck the Encode menu caption option in the webpart. I know it only states menu caption but I belive it does it for all rendered text.

0 votesVote for this answer Mark as a Correct answer

MyPoint CreditUnion answered on October 21, 2014 22:18

Would changing the title to "Staff stuff & policies" work?

0 votesVote for this answer Mark as a Correct answer

MyPoint CreditUnion answered on October 21, 2014 22:19

I thought that would happen. Instead of "&" I used "& # 3 8 ;" just take out the space.

0 votesVote for this answer Mark as a Correct answer

Mark Ellis answered on October 22, 2014 03:50

Yeah the encode menu caption option doesn't work.

I know I can just change what it says in the navigation section to "Staff stuff and Policies" and that works but I was more worried that new pages will be created with the issue.

I could clone the part or use a repeater but I think we'll just live with the issue for the time being.

Thanks all.

0 votesVote for this answer Mark as a Correct answer

Sandro Jankovic answered on December 8, 2014 10:14

Hi Mark,

I'm afraid that modifying the Web part to resolve this wouldn't be possible so if this becomes an issue in the future the solution would be to switch to a Repeater or another Web part which gives you more control over the rendering.

Best Regards,

Sandro

0 votesVote for this answer Mark as a Correct answer

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