首页 > 解决方案 > One of my route.ejs does not show header like all other route

问题描述

One of my route.ejs (post) does not show the header like other routes even though it has <%- include(header source) -%> like all of others.

It shows nav link but it does not show the logo, and when I clicked the link on the nav it crashed my site. Any help would be appreciate much. Thank you.

This is the route

app.get('/posts/:postTitle', isLoggedIn, function(req, res) {
  const requestedPostTitle = req.params.postTitle;

  Post.findOne({
    title: requestedPostTitle
  }, function(err, post) {

    res.render('post', {
      title: post.title,
      content: post.content

    });
  });
});

标签: node.jsejs

解决方案


推荐阅读