예제 #1
0
 /**
  * Return page slug
  *
  * @return string
  */
 public function getSlug()
 {
     if ($this->slug === null) {
         $slug = $this->getProperty('slug');
         if (empty($slug)) {
             $this->slug = Shade::slug($this->getTitle());
         } else {
             $this->slug = $slug;
         }
     }
     return $this->slug;
 }
예제 #2
0
 /**
  * Render a page sub-header
  *
  * @param  array   $params
  * @param  string  $content
  * @param  Smarty  $smarty
  * @param  boolean $repeat
  * @return string
  */
 public static function block_sub($params, $content, &$smarty, &$repeat)
 {
     if ($repeat) {
         return null;
     }
     $slug = isset($params['slug']) ? $params['slug'] : null;
     if (empty($slug)) {
         $slug = Shade::slug($content);
     }
     return '<h3 id="s-' . Shade::clean($slug) . '" class="sub_header">' . Shade::clean($content) . ' <a href="#s-' . Shade::clean($slug) . '" title="' . Shade::lang('Link to this Section') . '" class="sub_permalink">#</a></h3>';
 }
예제 #3
0
 /**
  * Return page slug
  *
  * @return string
  */
 public function getSlug()
 {
     if ($this->slug === null) {
         $this->slug = '';
         // str_replace('.', '-', $this->version_number) . '-';
         $slug = $this->getProperty('slug');
         if (empty($slug)) {
             $this->slug .= Shade::slug($this->getTitle());
         } else {
             $this->slug .= $slug;
         }
     }
     return $this->slug;
 }