Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

168
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda