Dotclear

Changeset 915:1420c60ab718


Ignore:
Timestamp:
10/26/12 15:31:03 (13 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

Add new template tag tpl:CategoryEntriesCount, fixes #1148 (plural forms should be discuss on ticket #1147)

File:
1 edited

Legend:

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

    r912 r915  
    8585          $this->addValue('CategoryDescription',array($this,'CategoryDescription')); 
    8686          $this->addValue('CategoryTitle',array($this,'CategoryTitle')); 
     87          $this->addValue('CategoryEntriesCount',array($this,'CategoryEntriesCount')); 
    8788           
    8889          # Comments 
     
    10971098          return '<?php echo '.sprintf($f,'$_ctx->categories->cat_title').'; ?>'; 
    10981099     } 
     1100 
     1101     /*dtd 
     1102     <!ELEMENT tpl:CategoryEntriesCount - O -- Category number of entries --> 
     1103     */ 
     1104     public function CategoryEntriesCount($attr) 
     1105     { 
     1106          $f = $this->getFilters($attr); 
     1107          return '<?php echo '.sprintf($f,'$_ctx->categories->nb_post').'; ?>'; 
     1108     } 
    10991109      
    11001110     /* Entries -------------------------------------------- */ 
Note: See TracChangeset for help on using the changeset viewer.

Sites map