Show
Ignore:
Timestamp:
05/21/08 15:27:00 (8 months ago)
Author:
aarkerio
Message:

New Try

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/app/views/newsletters/display.ctp

    r349 r541  
    33echo $html->div('title_section', 'Newsletters'); 
    44 
    5 if ( count($data) == 0) 
    6 { 
    7    echo $html->div('notice', 'Newsletter not yet done'); 
    8 } 
     5if ( count($data) == 0): 
     6    echo $html->div('notice', 'Newsletter not yet done'); 
     7endif; 
    98//die(var_dump($data)); 
    109 
    11  foreach ($data as $val) 
    12  { 
     10 foreach ($data as $val): 
    1311      $tmp  = $html->div('news_title', $val['Newsletter']['title']); 
    1412      $tmp .= $html->div('news_date',  $val['Newsletter']['created']); 
     
    1614 
    1715      echo $html->div('wrapnew', $tmp); 
    18  } 
     16 endforeach; 
    1917 
    20  if ( isset( $cU['User']['id'] )) 
    21  { 
    22    echo $html->para(null, $html->link('Subscribe to newsletter', '/newsletters/subscribe')); 
    23  }  
     18 if ( $session->check('Auth.User') ): 
     19    echo $html->para(null, $html->link('Subscribe to newsletter', '/newsletters/subscribe')); 
     20 endif;  
    2421?>