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


PHP system::OLIV_INDEX_PAGE方法代码示例

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


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

示例1: route

 private function route()
 {
     // separate url and values
     // look for url in page.xml
     $tempArray = $this->parseUrl(status::url());
     status::set('url', $tempArray['url']);
     status::set('val', $tempArray['val']);
     // add values to val-parameter
     status::set('path', $tempArray['path']);
     // add values to val-parameter
     //echoall($tempArray);
     // routable url found
     if (status::url()) {
         if ($newVal = OLIVRoute::getUrl(status::url())) {
             status::set('url', $newVal);
         } else {
             OLIVError::fire("route.php::route - rescan route information");
         }
     } else {
         // use 404 page or if not defined use index page
         if (system::OLIV_404_PAGE()) {
             status::set('url', system::OLIV_404_PAGE());
         } else {
             status::set('url', system::OLIV_INDEX_PAGE());
         }
     }
     // set page name in correct language
     status::set('OLIV_PAGE', system::OLIV_SITE_NAME() . " " . OLIVText::xml($this->getPageName(status::lang(), status::url())));
 }
开发者ID:nibble-arts,项目名称:oliv,代码行数:29,代码来源:route.php

示例2: __construct

 function __construct($header)
 {
     $this->content = OLIVModule::load_content($header);
     $pathActive = count(status::path());
     // get path
     if (array_key_exists("path", $_SESSION)) {
         $path = $_SESSION['path'];
     } else {
         $path = array();
     }
     // insert start page link if not active
     if ($path[0] != system::OLIV_INDEX_PAGE()) {
         $homePage = OLIVRoute::translateName(status::lang(), system::OLIV_INDEX_PAGE());
         $newNode = $this->content->addChild("path_point", $homePage);
         $newNode->addAttribute("href", system::OLIV_INDEX_PAGE());
         if ($pathActive == 0) {
             $newNode->addAttribute("class", "breadcrumb_active");
         } else {
             $newNode->addAttribute("class", "breadcrumb");
         }
     }
     // insert all links in hyrarchy
     $x = 1;
     foreach ($path as $page) {
         $pageName = OLIVRoute::translateName(status::lang(), $page);
         $newNode = $this->content->addChild("path_point", $pageName);
         $newNode->addAttribute("href", $page);
         if ($pathActive == $x) {
             $newNode->addAttribute("class", "breadcrumb_active");
         } else {
             $newNode->addAttribute("class", "breadcrumb");
         }
         $x++;
     }
     //echoall($this->content);
     $this->template = OLIVModule::load_template($header);
 }
开发者ID:nibble-arts,项目名称:oliv,代码行数:37,代码来源:breadcrumb.php

示例3: _load

 public static function _load($pageName)
 {
     $xml = "";
     if (!$pageName) {
         $url = status::url();
         // if no url defined, user OLIV_INDEX_PAGE
         if (!$url) {
             $url = system::OLIV_INDEX_PAGE();
         }
         $pageName = strtolower($url);
         // set to lowercase
     }
     // create content path
     $path = system::OLIV_PAGE_PATH() . $pageName . "/" . $pageName . ".xml";
     if (sessionfile_exists($path)) {
         // load content xml
         $xml = sessionxml_load_file($path);
         //------------------------------------------------------------------------------
         // search for plugins and call methods
         if ($xml->content->include) {
             OLIVPlugin::call($xml->content, "page");
         }
         //------------------------------------------------------------------------------
         return $xml;
     } else {
         OLIVError::fire("page::load - page not found");
     }
     return FALSE;
 }
开发者ID:nibble-arts,项目名称:oliv,代码行数:29,代码来源:page.php


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