def render_menu_children(request, parent, items, menu_tag):
    """
    Recursively render menu children.
    """
    childs = []
    output = []

    for menu in items:
        if menu['parent_id'] == parent['id']:
            childs.append(menu)

    if childs:
        output.append('<%s class="ul_sublevel">' % menu_tag)
        for menu in childs:

            current_class = ''
            if request.path == menu.get('url'):
                current_class = 'current'

            output.append('<li class="li_sublevel menu_%s %s">' % (menu['id'], current_class))
            output.append('<a href="%s" title="%s">%s</a>' % (menu['url'], menu['title'], menu['title']))
            output.append(render_menu_children(request, menu, items, menu_tag))
            output.append('</li>')
        output.append('</%s>' % menu_tag)
    return u'\n'.join(output)