Skip to content
Discussion options

You must be logged in to vote

I figured it out. Posting the solution here in case someone has a similar query.

I wanted my breadcrumbs to look like this:

Home > Category > Sub-category > post

with URLs only for Home and Sub-category.

I did it by modifying ui_helper.tmpl as follows:

## -*- coding: utf-8 -*-


<%def name="breadcrumbs(post)">
<%
    # Get the current language
    lang = getattr(post, 'lang', 'en')
    nav_links = navigation_links[lang]

    # Recursive flattening of NAVIGATION_LINKS
    def flatten_nav_links(items, parents=None):
        if parents is None:
            parents = []
        flat = []
        for entry in items:
            if isinstance(entry[0], tuple):  # submenu
                submen…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by KertLynx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant