![]() |
Varibles
Hi there,
If a variable is created in a php file, how can I tell a template where to find what the variable is meant to do? IE. $mad $mad is assigned in mad.php, how, in a template such as navbar_link, would I get this information from mad.php? Thanks |
Make a plugin and use hooks to achieve this.
|
What hook location would I select? Would I put the contents of mad.php into the plugin?
|
If the template is fetched on the same page as that in which $mad is defined then you can type $mad directly into your template.
|
Thats the thing, its not. navbar_link is used on every vb page.
|
You need to create & assign data to the variable before the template is parsed.
|
I know but how do I do this..?
|
Create a Plugin on the page on which the template is parsed. For something displayed on all pages, global_start would be best.
|
All times are GMT. The time now is 09:54 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|