GBPage::find PHP Method

find() static public method

static public find ( $uri_path_or_slug, $version = null, $applyBodyFilters = true )
    static function find($uri_path_or_slug, $version = null, $applyBodyFilters = true)
    {
        return parent::find($uri_path_or_slug, 'pages', 'GBPage', $version, $applyBodyFilters);
    }

Usage Example

Exemplo n.º 1
0
$gb_handle_request = true;
require 'gitblog/gitblog.php';
class smisk
{
    public static $stable_version = '1.1.6';
    public static $main_repo_url = 'git://github.com/rsms/smisk.git';
    public static $pgp_key = '431B61D0';
}
# this overrides some or all values if smisk::
GBPage::find('config')->body();
# / defaults to about page
if ($gb_request_uri === '') {
    gb::$is_page = true;
    gb::$is_posts = false;
    $gb_request_uri = 'about';
    $post = GBPage::find('about');
}
function selected($startswith)
{
    global $gb_request_uri;
    if (strpos($gb_request_uri, $startswith) === 0) {
        return 'class="selected"';
    }
    return '';
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
		<meta id="viewport" name="viewport" content="width=320; initial-scale=1.0; maximum-scale=2.0; minimum-scale=1.0; user-scalable=1;" />
All Usage Examples Of GBPage::find