האם יש דרך להוסיף תפריט ניווט לאתר מעל כותרת ה-Discourse?

סיכום מבוסס בינה מלאכותית

The discussion explores how to add a website navigation menu above the Discourse header. sok777 asks if it’s possible to integrate their existing website menu, possibly via an iframe. 4ong suggests using the header-submenus theme component, but sok777 clarifies they want their full website menu, not just a simple one. pfaffman recommends the Developer’s Guide to Discourse Themes. neounix confirms multiple methods exist, including using theme components, JavaScript, or plugins. jordan.vidrine provides a practical solution: editing the header.html file in the theme customization area to add custom HTML above the Discourse header, with CSS for styling. sok777 thanks everyone for the help.

Hi all,
I’m trying to figure out if there’s a way to keep our existing website’s top navigation menu, so that when people click on the forum they can still have an option to navigate back to other pages on the website to leave the forum.
Obviously, since it’s two different websites, it’s currently confusing for the users.

Is there a way to add our website menu above the default discourse one? In an iFrame for instance?

You can try this theme component to add a custom menu on top:

Thanks.
I took a look at that, but it seems like this is mostly a simple menu and not an HTML page..?
I would like to integrate our own menu as it appears on our website. Am I missing something?

Perhaps you need to look at Developer’s guide to Discourse Themes and the code in the header theme component.

Hi @sok777

There are many ways to add a navbar to the top of your pages. You can use the theme’ing capabilities of Discourse, or you can write some JS or jQuery to insert an element (like below) into the DOM, or you could write a very simple Discourse plugin to insert code into the application layout, etc. There are many ways to accomplish this kind of basic task.

For example, I just added this sample HTML snippet to create a demo placeholder for a new top navbar, just for you:

Your original question was:

The answer is yes, “there are many ways”.

HTH.

A very simple way to start is to edit the header.html file either in your theme (if you made one and are using it) or in your admin customizable area. admin/customize/themes/

Click on Edit CSS/Html

Once there, click on header. Your code here will appear above the discourse header. Make sure to add styles in the css as well.

Thanks everyone! That’s fantastic.