Templates all have variables defined in them which you can use. But it's hard to see sometimes which variables are actually available. But we can see it with one line. We'll use an example. Open pilot_public_profile.tpl, which is the profile of a pilot. At the top, we'll add one line (Yes, the pre tags are there on purpose - otherwise it will look like a jumbled mess):
<pre><?php print_r(get_defined_vars()); ?></pre>
As of phpVMS 2.1, you can do:
<?php echo Template::showVars(); ?>
And save it. When we load a pilot's profile, we'll see this (I removed the irrelevant chunks):
Recommended Comments
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.