require_once LIBRARIES_PATH . "/Prismic.php";
// this loads our Prismic helpers, which include the prismic.io PHP kit
$ctx = Prismic::context();
// getting the context built from our configuration (like the Api object it initializes)
global $linkResolver;
// getting the linkResolver object (more on this later)
/* Controller */
try {
    // API calls
    $homepage = Prismic::getDocument($ctx->getApi()->bookmark('homepage'));
    $skills = $ctx->getApi()->forms()->skills->ref($ctx->getRef())->submit();
    $works = $ctx->getApi()->forms()->works->ref($ctx->getRef())->submit();
    $stuffido = $ctx->getApi()->forms()->{"stuff-i-do"}->ref($ctx->getRef())->submit();
    $kindsofwork = $ctx->getApi()->forms()->everything->query('[[:d = at(document.type, "kind-of-work")]]')->ref($ctx->getRef())->submit();
} catch (Guzzle\Http\Exception\BadResponseException $e) {
    Prismic::handlePrismicException($e);
    // We need to catch any network issue, and render it properly
}
?>
<!DOCTYPE html>
<html lang="en-US" class="no-js">
    <head>

        <!-- ==============================================
        Title and Meta Tags
        =============================================== -->
        <meta charset="utf-8">
        <title>prismic.io's Bootstrap3 example</title>
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">