Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

165
Views
Breadcrumbs Express

I'd like to show Breadcrumbs for my pages in express. I couldn't find much and it seems like there are only a few people who want to build breadcrumbs on their websites or there must be a completely different way to solve the issue. I found 2-3 middlewares which are not actively maintained and it seems they doesn't support dynamic routes or it's not documentated well.

So assuming I got the following routes and breadcrumb names:

  • / => "Home"
  • /projects => "Projects"
  • /projects/:id/:slug => "Projectname from DB"
  • /projects/manage => "Manage"

I expected a popular middleware which is capable of storing breadcrumbs dynamically and once I call a "subpage" it will list return all parent breadcrumbs too. Something like this:

router.get('/:id/:slug', function(req, res, next) {
    var projectName = 'John Doe Project';
    req.breadcrumbs().add({name: projectName, url: '/url/to/project/'});
    res.render('projects/index', { title: 'Express', breadcrumbs: req.breadcrumbs()});
});

What is the best practice for providing breadcrumbs?

about 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!