Print OG Groups


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <?php if ($og_groups): ?>
  2.  
  3.  
  4.  
  5. <?php
  6.  
  7. $og_projects = array();
  8.  
  9. foreach ($node->og_groups_both as $key => $name) {
  10.  
  11. $og_projects[] = l($name,'node/'.$key,array('class'=>'terms'));
  12.  
  13. }
  14.  
  15. $og_projects = implode(', ',$og_projects);
  16.  
  17. ?>
  18.  
  19.  
  20.  
  21. <span class="terms terms-inline">project: <?php print $og_projects; ?> </span>
  22.  
  23.  
  24.  
  25. <?php endif; ?>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.