Jonathan Lahijani Posted July 31, 2015 Share Posted July 31, 2015 The PageRender module provides you with an "options" variable that provides some useful information, such as filename, pageStack, etc. Does that mean you should avoid redeclaring a variable of your own called $options? Link to comment Share on other sites More sharing options...
titanium Posted July 31, 2015 Share Posted July 31, 2015 No, you don't have to avoid using a variable called $options, because it $options is only used in a local scope, in this example it's used in the local scope of the method "renderPage()". It's not a global ProcessWire API variable like $page, $pages or $config, for example - you should avoid redeclaring these. Read more about these API variables here. Link to comment Share on other sites More sharing options...
Soma Posted July 31, 2015 Share Posted July 31, 2015 Yeah $options is a template var. If you need it you shouldn't overwrite it. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now