The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
||||
|
||||
mainupating a variable in template before using in vb each
Sample code:
HTML Code:
<vb:if condition="$first_item = X($myvar)"> <!-- do something --> </vb:if> <vb:each from="myvar" key="k" value="v"> <!-- do something --> </vb:each> Code:
Warning: Invalid argument supplied for foreach() in [path]/includes/functions.php on line 3555 PS: I'm aware of the counter workaround in vb:each but that doesn't go well with how I wanna write the template. The only workaround I can now think of array_shift the value in the actual php code (rather than in template) before registering the variable to the template which is something I wanna avoid. btw, you'll need to add this plug in to use these functions: hook: template_safe_functions code: $safe_functions[] = 'each'; |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|