Dotclear

Changeset 1249:3d1fd7774621


Ignore:
Timestamp:
07/31/13 19:22:42 (11 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
2.5
Message:

New template tpl:BlogParentThemeURL (return URL of parent theme of blog's theme if any, URL of blog's theme otherwise)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inc/public/class.dc.template.php

    r1179 r1249  
    6767          $this->addValue('BlogLanguage',array($this,'BlogLanguage')); 
    6868          $this->addValue('BlogThemeURL',array($this,'BlogThemeURL')); 
     69          $this->addValue('BlogParentThemeURL',array($this,'BlogParentThemeURL')); 
    6970          $this->addValue('BlogUpdateDate',array($this,'BlogUpdateDate')); 
    7071          $this->addValue('BlogID',array($this,'BlogID')); 
     
    839840      
    840841     /*dtd 
    841      <!ELEMENT tpl:BlogThemeURL - O -- Blog's current Themei URL --> 
     842     <!ELEMENT tpl:BlogThemeURL - O -- Blog's current Theme URL --> 
    842843     */ 
    843844     public function BlogThemeURL($attr) 
     
    845846          $f = $this->getFilters($attr); 
    846847          return '<?php echo '.sprintf($f,'$core->blog->settings->system->themes_url."/".$core->blog->settings->system->theme').'; ?>'; 
     848     } 
     849      
     850     /*dtd 
     851     <!ELEMENT tpl:BlogParentThemeURL - O -- Blog's current Theme's parent URL --> 
     852     */ 
     853     public function BlogParentThemeURL($attr) 
     854     { 
     855          $f = $this->getFilters($attr); 
     856          $parent = '$core->themes->moduleInfo($core->blog->settings->system->theme,\'parent\')'; 
     857          return '<?php echo '.sprintf($f,'$core->blog->settings->system->themes_url."/".('."$parent".' ? '."$parent".' : $core->blog->settings->system->theme)').'; ?>'; 
    847858     } 
    848859     
Note: See TracChangeset for help on using the changeset viewer.

Sites map