Categories > OpenTBS with ODT >

with OPENTBS_DOWNLOAD, I am getting template name, not defined file name

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: hemocyanin
Date: 2013-10-21
Time: 21:22

with OPENTBS_DOWNLOAD, I am getting template name, not defined file name

Very odd issue.  I am able to generate a document from my template perfectly, but instead of getting the filename I set, the downloadable file has the file name of the template document.

Example:

$TBS = new clsTinyButStrong;
$TBS->Plugin(TBS_INSTALL, OPENTBS_PLUGIN);
$template='templates/testing.odt';
$TBS->LoadTemplate($template);
$TBS->MergeBlock('testBlock', $testBlock);
$TBS->PlugIn(OPENTBS_DELETE_COMMENTS);
$fileName="downloadFileName.odt";  //Ultimately, instead of a static filename, I intend to use DB content, but I can't even get this static name to work
$TBS->Show(OPENTBS_DOWNLOAD, $fileName);

I would expect a prompt that says download "downloadFileName.odt"

Instead, it says download "testing.odt"

Any ideas where I should start looking to fix this?
By: Skrol29
Date: 2013-10-22
Time: 12:34

Re: with OPENTBS_DOWNLOAD, I am getting template name, not defined file name

Hi,

I can see not reason for this behavior.
Can you send to me a snippet that reproduces the bug?