Where to locate the menu navigation code

Ana T asked on September 20, 2021 08:35

I need assistance locating where the main menu navigation code lives in Kentico v12.0.29? Our site ms.org.au is using a H1 tag for each item in the menu. I need to change the HTML of the menu items to use a list item 'li' instead of a h1 tag for each menu item as this is not SEO friendly code.

Recent Answers


Juraj Ondrus answered on September 20, 2021 10:04

Are you using portal engine or MVC development model? In other words, when in Pages app in the admin UI, do you see tabs like Page, Design, Form, Properties or, you see tabs like Page, Content, Properties?

0 votesVote for this answer Mark as a Correct answer

Ana T answered on September 21, 2021 01:11

Hi Juraj, I see Page Design Form Properties tabs.

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on September 21, 2021 07:35

So, you are using portal engine. In this case, you need to check the Design tab to see what web part is used to render the menu. Then, find the web part in the Web parts application, edit it and on the General tab, you will see the code file path and name. Sample screen shot.

0 votesVote for this answer Mark as a Correct answer

Ana T answered on September 21, 2021 08:15

Thanks for that but I cant find the code file path and name. See here for the Web Part control ID on the Root level link text

This is the screen shot of the the web part application link text

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on September 21, 2021 08:26

OK, so you are using the hierarchical viewer web part which is inherited from the Universal viewer web part (see the "Inherited from" field). In this case, please check the documentation on using hierarchical transformations to learn how it works and where to edit the HTML code. You do not need to adjust the underlaying web part code files I guess.

0 votesVote for this answer Mark as a Correct answer

Ana T answered on September 21, 2021 08:59

Thanks Juraj, After reading all the help documents I can't find the HTML code where it is writing the menu items as H1s. Any other help would be great!

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on September 21, 2021 09:11

The hierarchical viewer is using transformations to output the HTML. This means, you need to edit given transformation. At first, you may want to check all of them to see which one is which.
Screen shot 1 and then you need to edit given transformation to see the ASCX/HTML code: Screen shot 2 and then refer to the transformations documentation I linked in the first sentence of this post.
Or, you may want to contact the original developer or check the project documentation as this should have been well documented for future reference.

0 votesVote for this answer Mark as a Correct answer

Ana T answered on September 22, 2021 04:32

Thankyou! I found the HTML code and it's fixed now. Appreciate your assistance.

0 votesVote for this answer Mark as a Correct answer

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