예제 #1
0
function perch_page_url($opts = array(), $return = false)
{
    $default_opts = array('hide-extensions' => false, 'hide-default-doc' => true, 'add-trailing-slash' => false, 'include-domain' => true);
    if (is_array($opts)) {
        $opts = array_merge($default_opts, $opts);
    } else {
        $opts = $default_opts;
    }
    $Pages = new PerchContent_Pages();
    $r = $Pages->get_full_url($opts);
    if ($return) {
        return $r;
    }
    echo PerchUtil::html($r);
}