本文整理汇总了PHP中render_partial函数的典型用法代码示例。如果您正苦于以下问题:PHP render_partial函数的具体用法?PHP render_partial怎么用?PHP render_partial使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了render_partial函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_partial_content
function get_partial_content($name)
{
ob_start();
render_partial($name);
$partial_content = ob_get_contents();
ob_end_clean();
return $partial_content;
}
示例2: get_partial_content
function get_partial_content($name, $locals = array())
{
ob_start();
render_partial($name, $locals);
$partial_content = ob_get_contents();
ob_end_clean();
return $partial_content;
}
示例3: render
function render($template, $data, $layout = 'layout')
{
global $title, $FLASH;
$flash = $FLASH;
$content = render_partial($template, $data);
foreach ($data as $k => $v) {
${$k} = $v;
}
include "templates/{$layout}.inc.php";
}
示例4: dirname
</script>
<?php
}
?>
<div class="sleeve_main">
<?php
global $request;
if (!isset($request->params['nickname'])) {
if (current_user_can('publish_posts')) {
require_once dirname(__FILE__) . '/post-form.php';
}
} else {
render_partial('profile');
}
?>
<div id="main">
<?php
global $paged;
?>
<h2><?php
echo $txt['index_recent_updates'];
if ($paged > 1) {
echo '(Page ' . $paged . ') ';
}
?>
<a class="rss" href="<?php
bloginfo('rss2_url');
?>
示例5: render
<?php
render(false);
if (!empty(Request::$params->forum_post)) {
$preview = true;
$forum_post = ForumPost::blank(array_merge(request::$params->forum_post, array('creator_id' => User::$current->id)));
$forum_post->created_at = gmd();
render_partial("post", array('post' => $forum_post));
}
示例6: _
<?php
if (!$post_values['contact_submit']) :
render_partial('contact_form');
else :
if ($errors == FALSE) {
$alert_title = _('Thank you');
$alert_intro = _('Your message is on its way to us. We will be in touch shortly!');
alert('done', $alert_title, $alert_intro);
}
else {
render_partial('contact_form', compact('post_values', 'errors'));
}
endif;
示例7: get_profile
?>
<?php
global $request;
?>
<?php
if (get_app_id()) {
?>
<?php
$profile = get_profile(get_app_id());
if ($profile->id == get_profile_id()) {
if (in_array('settings', $request->activeroute->patterns)) {
render_partial('admin');
}
}
// echo '<script type="text/javascript" src="'.$request->url_for(array('resource'=>'pages','action'=>'block.js')).'"></script>'; }
?>
<?php
if (!in_array('settings', $request->activeroute->patterns)) {
?>
<?php
if (isset($request->params['nickname'])) {
?>
<?php
if (!empty($profile->fullname)) {
示例8: render_partial
<h3>Suppression abonnement</h3>
<p>
<dl class="dl-horizontal">
<dt>Ordre</dt>
<dd>delete_abonnement</dd>
<dt>Description<dt>
<dd>Suppression d'un abonnement</dd>
<dt>Paramètre POST</dt>
<dd><em>flux_id</em></dd>
</dl>
</p>
<h3>Export OPML</h3>
<p>
<dl class="dl-horizontal">
<dt>Ordre</dt>
<dd>opml</dd>
<dt>Description<dt>
<dd>Export au format OPML des abonnements de l'utilisateur courant. L'organisation en dossiers est conservée.</dd>
<dt>Paramètre</dt>
<dd>Aucun</dd>
</dl>
</p>
</div>
</div>
</div>
<?php
render_partial("includes_js", null);
render_partial("footer", null);
示例9: compact
<?php
if (!$post_values['register']) :
render_partial('register_form');
else :
if ($errors == FALSE) {
$alert_title = '';
$alert_intro = '';
alert('done', $alert_title, $alert_intro);
}
else {
render_partial('register_form', compact('post_values', 'errors'));
}
endif;
示例10: render_partial
<?php
render_partial("layout/header");
yield_view();
render_partial("layout/footer");
示例11: dynamic_sidebar
function dynamic_sidebar()
{
global $request;
global $sidebar_done;
if (isset($request->params['nickname'])) {
if ($request->action == 'index' && $request->byid == get_profile_id()) {
render_partial('apps');
}
echo '<script type="text/javascript" src="' . $request->url_for(array('resource' => 'pages', 'action' => 'block.js')) . '"></script>';
$sidebar_done = true;
return true;
}
if (!$sidebar_done && get_profile_id() && $request->resource == 'identities' && in_array($request->action, array('edit', 'entry'))) {
if ($request->id == get_profile_id()) {
render_partial('admin');
}
$sidebar_done = true;
return true;
}
$blocks = environment('blocks');
if (environment('categories') && !empty($blocks) && !$sidebar_done && $request->resource == 'posts') {
foreach ($blocks as $b) {
// if it's the prologue theme, don't show PAGES in sidebar
if (!($b == 'pages' && is_microblog_theme())) {
//$renderpartial = true;
if (isset($renderpartial)) {
// this would be better/faster, but not working yet
echo '<script type="text/javascript">';
render_partial(array('resource' => $b, 'action' => 'block.js'));
echo '</script>';
} else {
// doing a call back to the server for each block. not cool XXX
echo '<script type="text/javascript" src="' . $request->url_for(array('resource' => $b, 'action' => 'block.js')) . '"></script>';
}
}
}
$sidebar_done = true;
}
if (environment('theme') == 'prologue-theme') {
echo '<a href="http://openmicroblogger.org"><img src="http://openmicroblogger.org/omb.gif" style="border:none;" alt="openmicroblogger.org" /></a>' . "\n";
}
return true;
}
示例12: render_partial
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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"/>
<title>Example<?php
if (isset($title)) {
echo ' - ' . $title;
}
?>
</title>
</head>
<body>
<?php
render_partial('header');
?>
<?php
echo $content_for_layout;
?>
<?php
if (Timer::$started) {
?>
<div id="timer">
<?php
echo Timer::end(5);
?>
<?php
echo " - " . round(memory_get_usage(true) / (1024 * 1024), 3) . " MB";
示例13: render_partial
<div id="forum" class="response-list">
<?php
if (Request::$params->page <= 1) {
?>
<?php
render_partial("post", array('post' => $forum_post));
?>
<?php
}
?>
<?php
foreach ($children as $c) {
?>
<?php
render_partial("post", array('post' => $c));
?>
<?php
}
?>
</div>
<?php
if (!$forum_post->is_locked) {
?>
<div style="clear: both;">
<div id="preview" class="response-list" style="display: none; margin: 1em 0;">
</div>
<div id="reply" style="display: none; clear: both;">
示例14: content_for
var css = ".javascript-hide { display: none !important; }";
var style = document.createElement("style"); style.type = "text/css";
if(style.styleSheet) // IE
style.styleSheet.cssText = css;
else
style.appendChild(document.createTextNode(css));
document.getElementsByTagName("head")[0].appendChild(style);
</script>
<link href="/stylesheets/default.css" media="screen" rel="stylesheet" type="text/css">
<script src="/javascripts/application.js" type="text/javascript"></script>
<?php
content_for('html_header');
?>
</head>
<body>
<?php
render_partial("layouts/notice");
?>
<div id="content">
<?php
content_for("layout");
?>
</div>
<?php
content_for('post_cookie_javascripts');
?>
</body>
</html>
示例15: render_partial
<?php
render_partial("plop", $params);
?>
<p>Hello world!</p>
<p>
Current directory:
<?php
echo $params["current_dir"];
?>
</p>