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
Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- mesteele101 responded to »ERR (3): E_USER_ERROR: Smarty error: [in pagesvar:pagesitem2en line XXX]…« 07:01 AM
- mazdev responded to »Pages 2.5.0 and updating - Page not found« 06:41 AM
- ehdwma created topic »Hide "Register new account" and change template to 3 col« 06:27 AM
- mesteele101 responded to »Zikula 1.3.3 - Selecting a category in Pages not working« 01:29 AM
- mdee created topic »How to implement returnpage ?« 01:00 AM
- nestormateo responded to »Fillters in Clip« 24. May
- damon responded to »Can the Updated Version Check be Turned Off (Z 1.3)« 24. May
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
Theme Variables
-
- Rank: Expert
- Registered: Aug 20, 2002
- Last visit: Jan 12, 2010
- Posts: 1219
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! -
- Rank: Expert
- Registered: Dec 02, 2002
- Last visit: Apr 30, 2010
- Posts: 1474
Hmmm I wish I had of know about this a few months back .... ;)
--
-Lobos
Professional PHP Framework Services: Concept, Development and Deployment
- Moderated by:
- Support
