T3Voila / templavoilaplus

TYPO3 Extension TemplaVoilà! Plus for TYPO3 8/9/10/11/12 LTS
https://extensions.typo3.org/extension/templavoilaplus/
GNU General Public License v2.0
26 stars 27 forks source link

Support needed with web2pdf integration and TVP v8 #485

Closed derBoogie closed 1 year ago

derBoogie commented 1 year ago

Hi,

after the update to version 8 of TVP, I need some help to adjust my user_function to work with web2pdf.

public function getChildTemplate(array $conf, &$pObj)
{
    $result = '';
    if (isset($conf['conf']['value']) && $conf['conf']['value'] = 'pdf')
    {
        $toRec = $pObj->markupObj->getTemplateRecord($conf['toRecord']['tx_templavoilaplus_to'], $conf['conf']['value'], $GLOBALS['TSFE']->sys_language_uid);
        if (is_array($toRec))
            $result = $conf['conf']['value'];
    }

    return $result;
}

Before update of TVP $conf['toRecord']['tx_templavoilaplus_to'] was the uid of the HTML template record. Now TVP is organized in yaml config files and the database tables no longer exists.

My question is how to load the HTML template now for the pdf generator?

opi99 commented 1 year ago

Do you need another template if you render it with web2pdf or how do you processed it till yet?

derBoogie commented 1 year ago

@opi99 the TVP PDF-template haven't changed. My question is, how to load the template, because $pObj->markupObj->getTemplateRecord($conf['toRecord']['tx_templavoilaplus_to'], ...) leads to the error: "getTemplateRecord() on null"

opi99 commented 1 year ago

After you questioned in the slack channel, did you got a solution now? Or does it need more help?

derBoogie commented 1 year ago

I'm closing this issue, because the function getChildTemplate is obsolete.