本文整理汇总了PHP中PageManager::setPage方法的典型用法代码示例。如果您正苦于以下问题:PHP PageManager::setPage方法的具体用法?PHP PageManager::setPage怎么用?PHP PageManager::setPage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PageManager
的用法示例。
在下文中一共展示了PageManager::setPage方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: substr
?>
<!-- Start main-content -->
<div class="main-content">
<!-- Section: home -->
<section>
<div class="container pb-0">
<div class="section-title text-center mb-0">
<div class="row">
<div class="col-md-12">
<h3 class="text-uppercase mt-0">WomenLine</h3>
<div class="title-icon">
<i class="flaticon-hand221"></i>
</div>
<div class="col-lg-10 col-md-9 col-sm-6 text-left">
<p><?php
echo substr(strip_tags($pm->setPage('introduction')->getPageInfo('page-content')), 0, 250);
?>
...</p>
</div>
<div class="col-lg-2 col-md-3 col-sm-6">
<a href="introduction" class="btn btn-colored btn-orange">Learn More</a>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Section: featured project -->
<section>
<div class="container pb-80">
<div class="section-title text-center">
示例2: URL
$url = new URL();
$pm = new PageManager();
$pages = $pm->getPageList();
echo Comman::loadView('admin-header');
?>
<div class="container" style="margin-top: 10px;">
<div class="row">
<div class="col-xs-12">
<div class="panel">
<div class="panel-body">
<table class="table table-bordered">
<tr><th>#</th><th>Name</th><th></th></tr>
<?php
$i = 1;
foreach ($pages as $page) {
$pm->setPage($page);
?>
<tr>
<td><?php
echo $i++;
?>
</td>
<td><?php
echo $pm->getPageInfo('page-title');
?>
</td>
<td><a href="<?php
echo $config->site_address . $page;
?>
/?mode=edit" target="_blank" class="btn btn-info">Edit</a></td>
</tr>
示例3: function
$scope.videos = $data.items;
});
})
.controller('newsDetailController', function($scope){
addActive('news');
$scope.title = "News";
setTitle("News");
$scope.breadcrumb = [
{title:'Home',link:'/home',active:false},
{title:'News',link:'/news',active:true},
];
hideSlider();
})
<?php
foreach ($list as $pageId) {
$pm->setPage($pageId);
?>
.controller('<?php
echo $pm->fixPageIdForController($pageId);
?>
Controller', function($scope){
addActive('<?php
echo $pageId;
?>
');
$scope.title = "<?php
echo $pm->getPageInfo('page-title');
?>
";
setTitle("<?php
echo $pm->getPageInfo('page-title');
示例4: Config
<?php
include '../core/includes.php';
$config = new Config();
$auth = new Auth();
$pm = new PageManager();
$pm->setPage($_REQUEST['page']);
if (!$auth->isAdmin()) {
header("Location:" . $config->site_address . "login");
}
if ($pm->setPageInfo('page-content', $_REQUEST['content'])) {
echo 1;
} else {
echo 0;
}