mittwald / typo3-web2pdf

A TYPO3 extension for rendering content as PDF
GNU General Public License v2.0
18 stars 20 forks source link

Plugin doesn't respect own templateRootPath #56

Closed r4fx closed 6 years ago

r4fx commented 8 years ago

Overriding layoutRootPath works fine, but templateRootPath doesn't,

my code looks like:

plugin.tx_web2pdf {
    view {
        templateRootPath = fileadmin/assets/plugins/web2pdf/Templates/
        partialRootPath = fileadmin/assets/plugins/web2pdf/Partials/
        layoutRootPath = fileadmin/assets/plugins/web2pdf/Layouts/
    }
}

TYPO3 7.6.5

webdev2027 commented 8 years ago

Hi, this is working for me. Try it like this ...

plugin.tx_web2pdf { view { templateRootPaths.100 = fileadmin/assets/plugins/web2pdf/Templates/ } }

Be sure, that your Template folder also include the folder pdf, like fileadmin/assets/plugins/... .. bildschirmfoto 2016-08-22 um 16 10 01

plojewski commented 8 years ago

Nope, it doesn't work at all. In constants:

plugin.tx_web2pdf { view { templateRootPath = files/assets/plugins/web2pdf/Templates/ } }

in Setup:

plugin.tx_web2pdf { view { templateRootPath.100 = files/assets/plugins/web2pdf/Templates/ } }

or

plugin.tx_web2pdf { view { templateRootPath= files/assets/plugins/web2pdf/Templates/ } }

I've got GeneratePdfLink.html file in Pdf folder.

xraysoft commented 8 years ago

Has anyone found a solution? Whether I follow the instructions in the documentation or the proposal you have made here, it does not work.

plojewski commented 8 years ago

You have to make pdf link by yourself in TS (if you don't want to change ext sources): lib.pdfLink = TEXT lib.pdfLink { value = Download this page as PDF typolink.parameter.data = TSFE:id typolink.additionalParams = &tx_web2pdf_pi1[argument]=printPage&tx_web2pdf_pi1[action]=&tx_web2pdf_pi1[controller]=Pdf typolink.target = _blank stdWrap.noTrimWrap = |<span class="icon icon-file-outline icon--lg"></span> <span>|</span>| }

xraysoft commented 8 years ago

Thanks, good solution. This works!

Kephson commented 7 years ago

It works in TYPO3 7.6.x with this setup: plugin.tx_web2pdf { view { templateRootPaths.100 = mypath/Web2pdf/Templates/ partialRootPaths.100 = mypath/Web2pdf/Partials/ layoutRootPaths.100 = mypath/Web2pdf/Layouts/ } }

But please update the TypoScript in the extension with the templateRootPaths, partialRootPaths and layoutRootPaths.