Breadcrums

21 views
Skip to first unread message

Gilgamezh

unread,
Apr 20, 2015, 9:24:43 AM4/20/15
to walik...@googlegroups.com
Hi to all!

I'm starting to use waliki at my work as a simple wiki. All I have is a
django project named "waliki_site"

All is working fine but I would like to have a breadcrumb menu to
navigate the different sections.

Can I configure it or should I add it to waliki?

regards!

Nico.


Martín Gaitán

unread,
Apr 20, 2015, 5:29:20 PM4/20/15
to Gilgamezh, waliki-devs
On Mon, Apr 20, 2015 at 10:27 AM, Gilgamezh <lis...@gilgamezh.me> wrote:
Hi to all!

I'm starting to use waliki at my work as a simple wiki. All I have is a
django project named "waliki_site"


Hey Nico, welcome and congrats! if your wiki is public (at least to view), it would be cool you listed it in django packages

https://www.djangopackages.com/packages/p/waliki/

(box "sites using waliki")

 
All is working fine but I would like to have a breadcrumb menu to
navigate the different sections.

Can I configure it or should I add it to waliki?

the bad news: You should add it. The good one: It shouldn't be hard.

For example, given a page slug, you could get each "parent" slug with something like this:

breadcrumbs = []
for s in slug.split('/'):
    if breadcrumbs:
        breadcrumbs.append(breadcrumbs[-1] + '/' + s)
    else:
        breadcrumbs.append(s)


then, as the slug is unique, you could get the Page instance for each slug (if it exists), and throught it get the titles to show.

this simple feature could fit perfectly as a plugin.

let us know if it works.

cheers
m.
Reply all
Reply to author
Forward
0 new messages