mediaateam
Active Member
I have a custom PDF template with a header and footer. If I place the divs in the place in the wiki (after: defined('_JEXEC') or die('Restricted access'); and before $form = $this->form;, they work fine, repeating on every page. But, I have a few variables that I would like call into the header, but they aren't assigned until after, so I moved them above the header footer divs, and then I get them in the header on the first page, but the headers and footers do not show up on any other pages.
Here's my code that repeats headers and footers, but doesn't show variable information:
And here's my code that shows the variables, but only has headers and footers on the first page of the pdf:
Any ideas?
Here's my code that repeats headers and footers, but doesn't show variable information:
Code:
defined('_JEXEC') or die('Restricted access');
?>
<div id="footdompdf">
<span class="footleft">Academy 2015/2016</span>
<span class="pagenum">Page </span>
</div>
<div id="headerdompdf">
<span class="headleft">RELEASE PACKET FOR <?php echo $sName; ?> (AppID-<?php echo $sAppID; ?>)</span>
<span class="pdfdate"><?php echo $rpDate; ?></span>
</div>
<?php
$form = $this->form;
$model = $this->getModel();
echo $form->intro;
echo '<div class="fabrikForm fabrikDetails" id="' . $form->formid . '">';
echo $this->plugintop;
echo $this->loadTemplate('buttons');
echo $this->loadTemplate('relateddata');
$app1Info = $this->groups['Release Packets'];
$app1Keys = $app1Info->elements;
$sName = $app1Keys['app_id']->element;
$sAppID = $app1Keys['app_id']->element_raw;
$rpDate = $app1Keys['date_time']->element_raw;
And here's my code that shows the variables, but only has headers and footers on the first page of the pdf:
Code:
defined('_JEXEC') or die('Restricted access');
$form = $this->form;
$model = $this->getModel();
echo $form->intro;
echo '<div class="fabrikForm fabrikDetails" id="' . $form->formid . '">';
echo $this->plugintop;
echo $this->loadTemplate('buttons');
echo $this->loadTemplate('relateddata');
$app1Info = $this->groups['Release Packets'];
$app1Keys = $app1Info->elements;
$sName = $app1Keys['app_id']->element;
$sAppID = $app1Keys['app_id']->element_raw;
$rpDate = $app1Keys['date_time']->element_raw;
?>
<div id="footdompdf">
<span class="footleft">Academy 2015/2016</span>
<span class="pagenum">Page </span>
</div>
<div id="headerdompdf">
<span class="headleft">RELEASE PACKET FOR <?php echo $sName; ?> (AppID-<?php echo $sAppID; ?>)</span>
<span class="pdfdate"><?php echo $rpDate; ?></span>
</div>
<?php
Any ideas?