def url(context, link_url):
    """
    Get the path for a page in the Cactus build.
    We'll need this because paths can be rewritten with prettifying.
    """
    site = context['__CACTUS_SITE__']
    url = site.get_url_for_page(link_url)

    if site.prettify_urls:
        return url.rsplit('index.html', 1)[0]

    return url