Fork me on GitHub

Theme Variables  Bottom

  • I know there are variables you can use to detect which block is which ($block['blockname'])

    I was wondering if there were any other variables that can be used for other purposes when developing a theme. Is there a list on this website some where ?

    In particular, I'm interested in knowing if there is a variable I can use to detect if the user is on the index.php page.

    Can anyone help? please? :D
  • For theme.php themes you can check $index to see if it's the homepage. It's not 100% accurate, but that's how it's used.

    I don't know of a good list, just do a print_r(get_defined_vars()); in your theme and you can see a good list of all that are available. Also, a print_r($GLOBALS); might help show you some.

    FYI... the majority of this is built into AutoTheme and possibly Xanthia, so you can use the admin to define specific things for the homepage or any module or block. Or if you're into PHP you can use the AutoTheme API, such as atIsHomePage();

    -Shawn

    --
    Get the Revolutionary AutoTheme HTML Theme System! Currently for Zikula, PHP-Nuke, CRE Loaded, osCommerce and Wordpress!
  • Hmmm I wish I had of know about this a few months back .... ;)

    --
    -Lobos
    Professional PHP Framework Services: Concept, Development and Deployment

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