In EJS template engine, how do I “include” a footer?

前端 未结 6 1458
萌比男神i
萌比男神i 2020-12-09 01:42

Let\'s say I saved a snipplet of a footer. How do I \"include\" that in my current template?

6条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-09 02:09

    I know this question has already been marked as answered, but I believe what you were looking for is the 'partial' syntax. In EJS, you can include the content from one view template in another like so:

    
      
      
        Blah blah blah
        <%- partial('footer') %>    
      
    
    

提交回复
热议问题