Fork me on GitHub

pnBlockShow behavior  Bottom

  • According to PN API docs pnBlockShow is supposed to return the output of the block display function.

    I have seen in other posts the suggested usage:

    Code

    echo pnBlockShow($module,$row['bkey'],$row);

    This works but not for the right reason. Most (all?) of the time pnShowBlock echoes the output and returns nothing.

    In pnRender's function.pnblockshow.php the following code

    Code

    ob_start();
                pnBlockShow($module, $blockname, pnBlockGetInfo($block));
                $output = ob_get_contents();
                ob_end_clean();

    clearly indicates the output is expected to be echoed, not returned.

    My question: Are there any conditions that cause this function to return the output as opposed to echoing the output?
  • 0 users

This list is based on users active over the last 60 minutes.