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


PHP page::title方法代码示例

本文整理汇总了PHP中page::title方法的典型用法代码示例。如果您正苦于以下问题:PHP page::title方法的具体用法?PHP page::title怎么用?PHP page::title使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在page的用法示例。


在下文中一共展示了page::title方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: view_node

 public function view_node($nid)
 {
     $node = content_database::node_load($nid);
     if (!$node) {
         page::redirect("");
     }
     $nt = content_database::load_node_type($node->type);
     $out = "";
     if ($nt->has_title && isset($node->title) && $node->title != null) {
         page::title($node->title);
     }
     if ($node->nid != 0) {
         $out .= "<h6>";
         $out .= self::post_author_date($node->uid, $node->author, $node->date);
         $out .= "</h6>";
     }
     if ($nt->has_body && isset($node->description)) {
         $out .= "<div class='body field'>";
         $out .= $node->description;
         $out .= "</div>";
     }
     foreach ($nt->fields as $field) {
         $out .= "<div class='field' id='field_" . $field['field_machine_name'] . "'>";
         $out .= "<span class='field_title' id='title_" . $field['field_machine_name'] . "'>" . $field['field_name'] . "</span>";
         $out .= "<div class='field_content' id='content_" . $field['field_machine_name'] . "'>";
         $f = $field['field_machine_name'];
         $out .= $node->{$f};
         $out .= "</div>";
         $out .= "</div>";
     }
     return $out;
 }
开发者ID:decima,项目名称:M2-platine,代码行数:32,代码来源:content_page.php

示例2: home

function home()
{
    $out = "there is actually no content. enable content module to manage this page";
    if (module_manager::is_enabled("content")) {
        $out = "";
        $nodes = content_database::node_load_all();
        $b = false;
        if (count($nodes) > 0) {
            page::title("Home");
            foreach ($nodes as $node) {
                if (content::node_access_read($node->nid)) {
                    $b = true;
                    $out .= "<div class='post'>";
                    if ($node->title != null) {
                        $out .= "<div class='title'>";
                        $out .= page::link("node/" . $node->nid, $node->title);
                        $out .= "</div>";
                    }
                    if ($node->description != null) {
                        $out .= "<div class='content'>";
                        $node->description = utf8_decode($node->description);
                        if (strlen($node->description) > 200) {
                            $out .= substr($node->description, 0, 200) . "... " . page::link("node/" . $node->nid, t("+ read more"));
                        } else {
                            $out .= $node->description;
                        }
                        $out .= "</div>";
                    }
                    $out .= "<div class='author'>";
                    $out .= "<hr/>";
                    $out .= content_page::post_author_date($node->uid, $node->author, $node->date);
                    $out .= "<hr/>";
                    $out .= "</div>";
                    $out .= "</div>";
                }
            }
        } else {
            $out .= "there is no content, please add a content first.";
        }
    }
    return $b ? $out : "there is no content.";
}
开发者ID:decima,项目名称:M2-platine,代码行数:42,代码来源:home.php

示例3: foreach

 <?php
 foreach((is_array(page::arg()) ? page::arg() : array())as $arg):
 ?>
 <?php $path .="$arg/";?>
 <li><a href="<?php echo $path;?>"><?php echo $arg;?></a></li>
 <?php endforeach;?>
 </ol>
* 
*/
?>
            <div class="">
                <?php 
if (page::title() != NULL) {
    ?>
                    <h1 class="page_title"><?php 
    echo page::title();
    ?>
</h1>
                <?php 
}
?>
                <?php 
echo page::content();
?>
            </div>
        </div>
        <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
        <script src="<?php 
echo page::url("theme/united/js/jquery.js");
?>
"></script>
开发者ID:decima,项目名称:M2-platine,代码行数:31,代码来源:page.php

示例4: profile_page

 public static function profile_page($user)
 {
     if (!is_numeric($user)) {
         $user = user::user_load_by_nickname($user);
     } else {
         $user = user::user_load($user);
     }
     page::title("profile");
     $out = t("nickname : %user", array("%user" => $user->username));
     return $out;
 }
开发者ID:decima,项目名称:M2-platine,代码行数:11,代码来源:user_ui.php

示例5: e403

 public static function e403()
 {
     self::unset_get_and_post();
     page::title("403 - Forbidden");
     return "the requested page is forbidden.";
 }
开发者ID:decima,项目名称:M2-platine,代码行数:6,代码来源:page.php

示例6: theme_list

 public static function theme_list()
 {
     page::title("Themes");
     $array = array();
     $header = array("theme", "path", "action");
     $themes = theme::list_of_declared_themes();
     foreach ($themes as $theme) {
         $res = "";
         if ($theme->theme_enabled && !$theme->theme_default) {
             $res = page::link("admin/themes/" . $theme->theme_name . "/setdefault", "Set default");
             $res .= " / ";
             $res .= page::link("admin/themes/" . $theme->theme_name . "/disable", "disable");
         }
         if ($theme->theme_enabled && $theme->theme_default) {
             $res = "<big>default theme</big>";
         }
         if (!$theme->theme_enabled) {
             $res = page::link("admin/themes/" . $theme->theme_name . "/enable", "enable");
         }
         $array[] = array($theme->theme_name, "<small>" . $theme->theme_path . "</small>", $res);
     }
     $str = '  <a href="' . page::url("admin/themes/scan") . '">Scan for more Themes</a><br/>';
     $str .= theme::t_table($array, $header);
     return $str;
 }
开发者ID:decima,项目名称:M2-platine,代码行数:25,代码来源:theme.php

示例7: page_list_modules

 public static function page_list_modules()
 {
     page::title("Modules");
     $res = array();
     $head = array("module", "action");
     $modules = module_manager::list_of_declared_modules();
     foreach ($modules as $module) {
         $b = array();
         $b[0] = $module->module_name;
         $b[1] = "";
         if ($module->module_installed && !$module->module_enabled) {
             $b[1] .= page::link("admin/modules/" . $module->module_name . "/enable", "Enable");
             $b[1] .= " / ";
             $b[1] .= page::link("admin/modules/" . $module->module_name . "/uninstall", "Uninstall");
         }
         if ($module->module_installed && $module->module_enabled) {
             $b[1] .= page::link("admin/modules/" . $module->module_name . "/disable", "disable");
         }
         if (!$module->module_installed) {
             $b[1] .= page::link("admin/modules/" . $module->module_name . "/install", "install");
         }
         $res[] = $b;
     }
     $str = '  <a href="' . page::url("admin/modules/scan") . '">Scan for more modules</a><br/>';
     $str .= theme::t_table($res, $head);
     return $str;
 }
开发者ID:decima,项目名称:M2-platine,代码行数:27,代码来源:module_manager.php


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