kirby/branches/multilang/page.php
/**
   * Returns the URL key from the content file
   * if available and otherwise returns the page UID
   * 
   * @param string $lang
   * @return string
   */
Returns the URL key from the content file
if available and otherwise returns the page UID

@param string $lang
@return string
Returns the URL key from the content file if available and otherwise returns the page UID @param string $lang @return string
public function urlKey($lang = null) {
    if($content = $this->content($lang)) {
      if($key = (string)a::get((array)$content->data(), 'url_key')) {
        return $key;
      }
    } 
    return $this->uid();
  }
public function urlKey ( $ lang = null ) { if ( $ content = $ this -> content ( $ lang ) ) { if ( $ key = ( string ) a :: get ( ( array ) $ content -> data ( ) , 'url_key' ) ) { return $ key ; } } return $ this -> uid ( ) ; }
Returns the URL key from the content file
 if available and otherwise returns the page UID
Returns the URL key from the content file if available and otherwise returns the page UID
// search for a translated url_key in that language // if available, use the translated url key as slug