Fork me on GitHub

Variable passed to themes  Bottom

  • Where can I find a list of the variables passed to themes? Like $GLOBAL, $preformat, and $info?

    Thanks,
    KevinM
  • The only vars that are passed to the theme are in the argument list of the theme functions, i.e. themearticle() and themeindex() and $block in themesidebox(). $GLOBALS are all global vars defined elsewhere in PN.

    To find out what's contained in one of the arrays, i.e. $preformat, just do:

    Code

    echo "<pre>"; print_r($preformat); echo "</pre>";


    HTH
    -Shawn

    --
    Get the Revolutionary AutoTheme HTML Theme System! Currently for Zikula, PHP-Nuke, CRE Loaded, osCommerce and Wordpress!
  • You can also find a link to a handy reference list in the post here:
    Theme Guide: Tips fo…g and starter theme
    For the "story" variables passed to themeindex/themearticle...

    --
    Get PhotoGallery, PayPalCart, Dynamenu, Enhanced Blocks & other mods

    Cape Cod Travel Info...
  • Abra, thanks for the code snippet..that helps.

    Nate, It would be nice to have a reference list but your mentalbloc.net link is dead. I went the mentalbloc.net site and couldn't find any links to PN stuff. Could you please update the link in your (excellent) tutorial?

    Thanks,
    KevinM
  • Thanks for pointing that out, kmasaryk, figured it would happen sooner or later.

    You can now find a list of story vars in section IV in the first post...

    --
    Get PhotoGallery, PayPalCart, Dynamenu, Enhanced Blocks & other mods

    Cape Cod Travel Info...
  • 0 users

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