XPressME Integration Kit

Trac


Ignore:
Timestamp:
Dec 27, 2008, 12:29:06 PM (15 years ago)
Author:
toemon
Message:

コメントブロックにsmarty変数 data_countをアサイン
ブロックに表示されるコメント数を取得、主にテンプレート側でデータ無し時の処理を書くときに使用
(data_countが 0 のときは「コメントがありません」を表示等

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/templates/blocks/recent_comments_block.html

    r44 r49  
     1<{* **************************  usage **************************** 
     2        The template tag of the following list can be used.  
     3                <{$block.data_count}> 
     4                <{$content.from_auther_to_post}> 
     5                <{$content.comment_ID}> 
     6                <{$content.comment_post_ID}> 
     7                <{$content.comment_date}> 
     8                <{$content.comment_date_time}> 
     9                <{$content.comment_content}> 
     10                <{$content.comment_excerpt}> 
     11                <{$content.comment_link}> 
     12                <{$content.comment_title}> 
     13                <{$content.comment_title_link}> 
     14                <{$content.post_link}> 
     15                <{$content.post_title}> 
     16                <{$content.post_title_link}> 
     17                <{$content.author_link}> 
     18                <{$content.author_name}> 
     19                <{$content.author_name_link}> 
     20                <{$content.comment_type}> 
     21   ************************* End of usage ************************ *}> 
     22<{* Start Template *}> 
     23 
    124<ul class="xpress_recent_comments"> 
    2         <!-- The template tag of the following list can be used.  
    3                         <{$content.from_auther_to_post}> 
    4                         <{$content.comment_ID}> 
    5                         <{$content.comment_post_ID}> 
    6                         <{$content.comment_date}> 
    7                         <{$content.comment_date_time}> 
    8                         <{$content.comment_content}> 
    9                         <{$content.comment_excerpt}> 
    10                         <{$content.comment_link}> 
    11                         <{$content.comment_title}> 
    12                         <{$content.comment_title_link}> 
    13                         <{$content.post_link}> 
    14                         <{$content.post_title}> 
    15                         <{$content.post_title_link}> 
    16                         <{$content.author_link}> 
    17                         <{$content.author_name}> 
    18                         <{$content.author_name_link}> 
    19                         <{$content.comment_type}> 
    20         --> 
    21  
     25        <{$block.data_count}> 
    2226        <{foreach from=$block.contents item=content}> 
    2327                <li> 
Note: See TracChangeset for help on using the changeset viewer.