Hi,

Thank you for the module - love it. I have an og panel with several tabs that I want to display on one line but can't because of the right sidebars making the tabs wrap on two lines. Is there a way to display them in a block?

Kind regards,

Jim

Comments

jimthunderbird’s picture

Hi Jim,
The og panels tab information is stored in the table og_panels. I guess you can create this block with a sql statement and php code, something like:

    $result = db_query("SELECT * FROM {og_panels} WHERE published = 1 AND nid = %d", $gid); // gid is your current group id
    $output = '<div id="og-panels-tabs-block">';
    $output .= '<ul>';
    while($row = db_fetch_object($result)){
       if($row->default_page == 1){
          $output .= '<li>'.l($row->page_title, "node/$gid").'</li>';
       }
       else{
          $output .= '<li>'.l($row->page_title, "node/$gid/og-panel/".$row->tab_num).'</li>';
       }
    }
    $output .= '</ul>';
    $output .= '</div>';
    print $output;
   

Just a rough idea. Hope it helps.

Best Regards,
Jim

jwilde’s picture