Placeholder in PDF?

procajlok

Member
Hi ;)
How I can add placeholder do generate PDF? I want take username who generate PDF. I propably must add this to \components\com_fabrik\views\list\tmpl\..\default.php but i dont know how :(

Regards!
 
Rather than editing a template file, which means creating a custom template so your code doesn't get overridden (which means you have to keep that custom template up to date), the easier way would be to install Sourcerer (from Regular Labs), and insert a little custom code in the intro for your list:

Code:
{source}
<?php
$app = JFactory::getApplication();
if ($app->input->get('format', 'html') === 'pdf') {
   $username = JFactory::getUser()->get('username');
   echo "<div>The username is: $username</div>\n";
}
?>
{/source}

Then make sure you enable "Process Joomla plugins" in the list's advanced settings.

That way, you don't have to maintain a custom template.

Obviously you can modify the markup in that echo to suit.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top