def url(context, link_url):
 site = context['__CACTUS_SITE__']
 page = context['__CACTUS_CURRENT_PAGE__']
 url = site.get_url_for_page(link_url)
 if (url is None):
  link_url_index = os.path.join(link_url, 'index.html')
  url_link_url_index = site.get_url_for_page(link_url_index)
  if (url_link_url_index is None):
   logger.warning('%s: page resource does not exist: %s', page.link_url, link_url)
  url = link_url
 if site.prettify_urls:
  return url.rsplit('index.html', 1)[0]
 return url

def url ( context , link_url ) : site = context [ '__CACTUS_SITE__' ] page = context [ '__CACTUS_CURRENT_PAGE__' ] url = site . get_url_for_page ( link_url ) if ( url is None ) : link_url_index = os . path . join ( link_url , 'index.html' ) url_link_url_index = site . get_url_for_page ( link_url_index ) if ( url_link_url_index is None ) : logger . warning ( '%s: page resource does not exist: %s' , page . link_url , link_url ) url = link_url if site . prettify_urls : return url . rsplit ( 'index.html' , 1 ) [ 0 ] return url
returns an absolute url matching given view with its parameters .