Fork me on GitHub

Including a tabblock in an htmlpage.  Bottom

  • I've a tabblock that works standalone as a block. I'd like to
    include the block in an htmlpage that checks whether the user is
    logged in. I've added code to verify the user is logged in and then
    call the block as below

    Code

    <!--[if pnuserloggedin($loggedin) ne 0]-->
    <!--[pnblock bid=70]-->
    <!--[/if]-->


    My tabbed block looks great in the center block. Each separate tab is marked
    'Inactive' as in the docs. Each tab works as supposed to with the content
    expected. I have confirmed the login check is working by a string message. But

    Code

    <!--[pnblock bid=70]-->
    does not render the output of my tabbed block. The only way to get
    the tabblock to output is to make the block active in the center frame by
    bypassing the login check.


    I am using enhanced blocks to state which page and module can display the
    block but this is all set correctly...and verified because showing the block
    in the center column on the same page (and only this page) works.
    But calling the 'Inactive' tabbed block fails. Any advice is welcome.

    TIA
  • I do this adding the tab block to a empty module.
  • I left a copy of the module that I use, I call it Tabulador,
    I'm not sure if it do all you need ¿?? http://www.gerky.net…argas/Tabulador.zip

  • Hey gerkynet,

    Thanks for your help I installed, initialized and activated your module.
    When I go to Admin > System > Blocks > Add New I get an error messaage

    Fatal error: Cannot redeclare blocks_tabblock_display()
    (previously declared in /usr/local/www/data/postnuke/includes/blocks/tabblock.php:43) in /usr/local/www/data/postnuke/modules/Tabulador/pnblocks/tabblock.php on line 308

    Does your module replace tabbed block? It looks like it's trying
    to redefine a tabbed block component.

    TIA. PD
  • I do this with blockhome. I'm not sure it will give you everything you want from an HTML page, but you can have an HTML block and a tabblock in a blockhome page.
  • What I'm trying to get to is a static page if the user is not logged in and
    a tabbed block if they are logged in. I have block home installed but have
    not tried it yet. I had planned on using the block home module on my news
    page..so I guess I will go ahead and start studying the docs. If you've done
    the login logic around a tabbed block in block home and had it work or
    fail please do speak up.

    Slightly related..I've a google map loaded on one tab of my tabbed block. My
    own code (not the GoogleMap module) .I'd like to delay loading until the tab is
    selected. Not quite sure how to do this unless something like onClick/Focus.
  • I haven't run any login logic through blockhome, but I wonder if your login check and block outputs would work as a PHP block. It all depends on whether the PHP block will call the block output, which seems to be the main problem. If it does show in PHP block, the login check could of course "else" to a static HTML block if the user isn't logged in.



    edited by: luzdelsol, Nov 12, 2006 - 03:42 PM
  • 0 users

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