当前位置: 首页>>代码示例>>PHP>>正文


PHP SiteHelpers::renderHtml方法代码示例

本文整理汇总了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);
 }
开发者ID:buguelos,项目名称:make,代码行数:52,代码来源:HomeController.php

示例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>
开发者ID:blackorwhite1233,项目名称:fakekinhdoanh,代码行数:31,代码来源:index.blade.php

示例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);
 }
开发者ID:blackorwhite1233,项目名称:fakekinhdoanh,代码行数:13,代码来源:HomeController.php


注:本文中的SiteHelpers::renderHtml方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。