Include in Block Vars
-
- Supporter
- Posts: 316
- Joined: 18 Sep 2007, 14:35
- Real name: David
- Contact:
Include in Block Vars
If you include a file while in a block vars loop, and that file has more things to do with that loop, will those things be parsed?
That's like, I can't beat my neighbor in an argument, so instead I kill his dog.
-Best English Teacher Ever
- 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: Include in Block Vars
You cannot use block vars in an included template file, if that's what you mean.
- we're poor!
-
- Supporter
- Posts: 27
- Joined: 01 Sep 2007, 12:27
- Real name: Tim [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: Include in Block Vars
I think it won't work because (if I'm correct) the file will be included more than 1 times which gives an error in PHP because PHP can only include files once.
- 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: Include in Block Vars
PHP can include files multiple times, that's not the problem. The problem is that the template variables are not parsed if they're not in the same file as the block.
- we're poor!
-
- New member
- Posts: 12
- Joined: 05 Jun 2008, 23:42
- Real name: Austin
- Location: The 145,721th dimenson
- Contact:
Re: Include in Block Vars
~-If at first you don't succeed, hide all evidence that you tried-~
-
- Supporter
- Posts: 316
- Joined: 18 Sep 2007, 14:35
- Real name: David
- Contact:
Re: Include in Block Vars
You can't use include_once in a template...
That's like, I can't beat my neighbor in an argument, so instead I kill his dog.
-Best English Teacher Ever
-
- Supporter
- Posts: 316
- Joined: 18 Sep 2007, 14:35
- Real name: David
- Contact:
Re: Include in Block Vars
You don't get what I'm asking. I'm asking about including a template with block vars in it.
That's like, I can't beat my neighbor in an argument, so instead I kill his dog.
-Best English Teacher Ever
Return to “phpBB Development discussion”
Who is online
Users browsing this forum: No registered users and 32 guests