fdoc

subroutinebreadcrumbsprivate

subroutine breadcrumbs(site, id, b)

Write what contains entity id, from its source file down, each with a link to its page.

Arguments

NameTypeIntentAttributesDescription
sitetype(site_t)in

the site

idintegerin

the entity

btype(buffer_t)inout

the HTML

Calls

Source

Show the code
subroutine breadcrumbs(site, id, b)
    type(site_t), intent(in) :: site        !! the site
    integer, intent(in) :: id               !! the entity
    type(buffer_t), intent(inout) :: b      !! the HTML
    integer :: chain(MAX_NESTING)
    integer :: k, n, up

    n = 0
    up = site%p%list%box(id)%e%parent
    do while (up > 0 .and. n < MAX_NESTING)
        n = n + 1
        chain(n) = up
        up = site%p%list%box(up)%e%parent
    end do
    if (n == 0) return
    call add(b, '<div class="crumbs">')
    do k = n, 1, -1
        call link_to(site, chain(k), display_name(site%p%list%box(chain(k))%e), b)
        if (k > 1) call add(b, ' <span class="sep">&rsaquo;</span> ')
    end do
    call add(b, '</div>'//achar(10))
end subroutine breadcrumbs

Graphs

Calls

Called by