Print to Blank Page

MarkxMcDonald 07 Apr, 2015
Hi!

I am currently using chronoforms Custom Element to echo some html and db elements. The issue I am having is I want to echo/print everything to a blank web page. However when I try and print, Joomla's header title and navigation tree also show as well as the footer content of the website. Is there anyway I can use php/custom code to print just the html and database items I want vs the extra header and footer html of the joomla site?

Much thanks,
Mark
GreyHead 07 Apr, 2015
Hi Mark,

If you add &tmpl=component to the URL of your page then Joomla! should omit the template stuff (though not all templates are well-behaved).

Bob
MarkxMcDonald 07 Apr, 2015
Thanks that worked perfectly!
My only other question is I've been using $file = fopen($form->data['_PLUGINS_']['upload_files']['file_upload']['path'],"r") or exit("Unable to open file."); to upload files in v4 but in v5 it blows up on me.
Is there different code to make the v5 work as well?
Max_admin 08 Apr, 2015
Hi Mark,

Please try this:
$form->files["file_name"]["path"]


Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
MarkxMcDonald 08 Apr, 2015
Does file_name refer to the chronoform control or the file name being uploaded or should it be left as is? Just so I understand the code should look like:

$file = fopen($form->files["file_name"]["path"],"r") or exit("Unable to open file.");
GreyHead 08 Apr, 2015
Hi Mark,

CFv5 add the files info to $form->files Add this temporarily to a Custom Code action to see the exact names
<?php
echo'<div>$form->files: '.print_r($form->files, true).'</div>';
?>

Bob
This topic is locked and no more replies can be posted.