Odd assign_block_vars problem
- igorw
- Past Contributor
- Posts: 1967
- Joined: 01 Jun 2006, 20:48
- Real name: Igor [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: Odd assign_block_vars problem
And why exactly are you using <!-- PHP --> tags? Use normal template variables.
- we're poor!
-
- Supporter
- Posts: 32
- Joined: 12 Aug 2009, 16:16
- Real name: David
- Contact:
Re: Odd assign_block_vars problem
phpBB.com Development Team Member | |
Please do NOT contact for support via PM or email.
Please do NOT contact for support via PM or email.
Re: Odd assign_block_vars problem
I agree you should just do it the usual way, but here's the reason your approach didn't work. Template files are parsed inside a function of the template class. Inside the scope of that function, $template isn't set. To do it the way you were trying, instead of $template->_rootref, you'd have to use $this->_rootref.
Return to “phpBB Development discussion”
Who is online
Users browsing this forum: No registered users and 31 guests