本文整理汇总了PHP中SiteHelpers::renderHtml方法的典型用法代码示例。如果您正苦于以下问题:PHP SiteHelpers::renderHtml方法的具体用法?PHP SiteHelpers::renderHtml怎么用?PHP SiteHelpers::renderHtml使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SiteHelpers
的用法示例。
在下文中一共展示了SiteHelpers::renderHtml方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
public function index()
{
if (CNF_FRONT == 'false' && Request::segment(1) == '') {
return Redirect::to('dashboard');
}
if (is_null(Input::get('p'))) {
$page = Request::segment(1);
} else {
$page = Input::get('p');
}
if ($page != '') {
$content = Pages::where('alias', '=', $page)->where('status', '=', 'enable');
if ($content->count() >= 1) {
$content = $content->get();
$row = $content[0];
$this->data['pageTitle'] = $row->title;
$this->data['pageNote'] = $row->note;
$this->data['breadcrumb'] = 'active';
if ($row->access != '') {
$access = json_decode($row->access, true);
} else {
$access = array();
}
// If guest not allowed
if ($row->allow_guest != 1) {
$group_id = Session::get('gid');
$isValid = isset($access[$group_id]) && $access[$group_id] == 1 ? 1 : 0;
if ($isValid == 0) {
return Redirect::to('')->with('message', SiteHelpers::alert('error', Lang::get('core.note_restric')));
}
}
if ($row->template == 'backend') {
$this->layout = View::make("layouts.main");
}
$filename = public_path() . "protected/app/views/pages/template/" . $row->filename . ".blade.php";
if (file_exists($filename)) {
$page = 'pages.template.' . $row->filename;
} else {
return Redirect::to('')->with('message', SiteHelpers::alert('error', Lang::get('core.note_noexists')));
}
} else {
return Redirect::to('')->with('message', SiteHelpers::alert('error', Lang::get('core.note_noexists')));
}
} else {
$this->data['pageTitle'] = 'Home';
$this->data['pageNote'] = 'Welcome To Our Site';
$this->data['breadcrumb'] = 'inactive';
$page = 'pages.template.home';
}
$page = SiteHelpers::renderHtml($page);
$this->layout->nest('content', $page, $this->data)->with('menus', $this->menus)->with('page', $this->data);
}
示例2: date
<div class="col-md-9">
@foreach ($rowData as $row)
<div class="blog-post">
<div class="post-item">
<div class="title"><h3><a href="{{ URL::to('blog/read/'.$row->slug)}}"> {{ $row->title }} </a></h3></div>
<div class="blog-info-small">
<i class="fa fa-folder icon-muted"></i> <span> <a href="{{ URL::to('blog/category/'.$row->alias)}}">{{ $row->name}}</a> </span>
<i class="fa fa-user icon-muted"></i> <span> {{ $row->username }} </span>
<i class="fa fa-calendar"></i> <span> {{ date("M j, Y " , strtotime($row->created)) }} </span>
<i class="fa fa-comments"></i> <span> <a href="{{ URL::to('blog/read/'.$row->slug.'#comments')}}"> {{ $row->comments }} comments</a> </span>
</div>
<div class="summary">
<?php
$content = explode("<hr />", $row->content);
echo SiteHelpers::renderHtml($content[0]);
?>
<a href="{{ URL::to('blog/read/'.$row->slug)}}" class="btn btn-success btn-sm"> Read More <i class="fa fa-angle-right"></i></a>
</div>
</div>
</div>
@endforeach
<div class="col-sm-3">
<p class="text-center" style="line-height:30px;">
{{ Lang::get('core.grid_displaying') }} : <b>{{ $pagination->getFrom() }}</b>
{{ Lang::get('core.grid_to') }} <b>{{ $pagination->getTo() }}</b>
{{ Lang::get('core.grid_of') }} <b>{{ $pagination->getTotal() }}</b>
</p>
</div>
示例3: contactus
public function contactus()
{
$input = array("name" => '', "phone" => '', "email" => '', "content" => '', "subject" => '');
if (Session::has('input_rd')) {
$input = Session::get('input_rd');
}
$data['input'] = $input;
$page = 'pages.template.contactus';
$this->data['pageTitle'] = 'Contact US';
$this->data['pageNote'] = 'Welcome To Our Site';
$page = SiteHelpers::renderHtml($page);
$this->layout->nest('content', $page, $data)->with('page', $this->data);
}