Dotclear


Ignore:
Timestamp:
07/10/11 21:58:19 (14 years ago)
Author:
Franck <carnet.franck.paul@…>
Branch:
themes
Message:

Mise en place gestion paramétrée des types de liste de billets (home, catégorie, search, tag, archive-month)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • themes/ductile/_public.php

    r515 r563  
    1717$core->addBehavior('publicInsideFooter',array('tplDuctileTheme','publicInsideFooter')); 
    1818 
     19# Templates 
     20$core->tpl->addValue('ductileEntriesList',array('tplDuctileTheme','ductileEntriesList')); 
     21 
    1922class tplDuctileTheme 
    2023{ 
     24     public static function ductileEntriesList($attr) 
     25     { 
     26          global $core; 
     27          $default = isset($attr['default']) ? trim($attr['default']) : 'short'; 
     28 
     29          $model = ''; 
     30          $s = $core->blog->settings->themes->get($core->blog->settings->system->theme.'_entries_lists'); 
     31          if ($s !== null) { 
     32               $s = @unserialize($s); 
     33               if (is_array($s)) { 
     34                    if (isset($s[$core->url->type])) { 
     35                         $model = $s[$core->url->type]; 
     36                    } 
     37               } 
     38          } 
     39 
     40          $local_attr = array('src' => '_entry-'.($model ? $model : $default).'.html'); 
     41          return $core->tpl->includeFile($local_attr); 
     42     } 
     43 
    2144     public static function publicInsideFooter($core) 
    2245     { 
Note: See TracChangeset for help on using the changeset viewer.

Sites map