Dotclear


Ignore:
Timestamp:
10/28/12 07:34:51 (13 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

Add content_only attribute for tpl:EntryFirstImage, fixes #1037

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inc/public/lib.tpl.context.php

    r923 r927  
    341341      
    342342     # First post image helpers 
    343      public static function EntryFirstImageHelper($size,$with_category,$class="",$no_tag=false) 
     343     public static function EntryFirstImageHelper($size,$with_category,$class="",$no_tag=false,$content_only=false) 
    344344     { 
    345345          global $core, $_ctx; 
     
    363363          if ($_ctx->posts) 
    364364          { 
    365                $subject = $_ctx->posts->post_excerpt_xhtml.$_ctx->posts->post_content_xhtml; 
     365               $subject = ($content_only ? '' : $_ctx->posts->post_excerpt_xhtml).$_ctx->posts->post_content_xhtml; 
    366366               if (preg_match_all($pattern,$subject,$m) > 0) 
    367367               { 
Note: See TracChangeset for help on using the changeset viewer.

Sites map