Have a single menu on multiple pages?

前端 未结 6 1393
梦如初夏
梦如初夏 2020-12-30 15:18

So I have a website and I\'m using a basic menu located at the top right corner of the screen. It\'s links are as follows:

| Home | Blog | Results | Pictures         


        
6条回答
  •  天涯浪人
    2020-12-30 16:13

    There are various ways to do this. It depends what you have access to on the server. Possibly the simplest mechanism is server-side includes. You would just have a file that contains the menu and include it on every page.

    You can also do this with every programming language in more or less elegant ways.

    EDIT: The SSI is quite simple. You can just make a /header.html file, then do:

      
    

    in the appropriate place.

提交回复
热议问题