Skip to content Skip to sidebar Skip to footer

Approaches To Build Breadcrumbs

I have been working on a website which is basically a learning portal and user will have certain lessons inside certain category. My requirement is to build breadcrumbs on the pag

Solution 1:

Usually, if you're talking dynamic breadcrumbs, they are generated by the server-side technology, rather than purely client-side. The server is going to know the exact page structure and what pages are parents of the current pages.

It'd be more unusual and difficult to do entirely client-side, but certainly possible. You might be able to do something like scrape the URL structure to determine parent pages. For example, if they are at /lessons/lesson1/intro you might split that string, compare each value against some dictionary of "Nice" values, and display "Lessons > Lesson 1 > Intro"

Post a Comment for "Approaches To Build Breadcrumbs"