[TYPO3-mvc] Action with HTML and PDF

Christine Gerpheide cgerpheide at gmail.com
Wed Jan 5 12:56:54 CET 2011


Hi Daniel,

2011/1/5 Franz Koch <typo3.RemoveForMessage at elements-net.de>

> Hey,
>
>
> the link attribute "format=pdf" is not the same as the pageType. If you
> like to switch to a specific pageType as well as change the default template
> suffix to PDF you have to use both attributes in your PDF link:
>
> <f:link action="card" format="pdf" additionalParams="&type=203">Card
> (PDF)</f:link.action>
>
> Something like this I suppose (not sure about the additionalParams
> part/syntax).
>


The link.action viewhelper actually offers a pageType parameter:
<f:link.action action="card" format="pdf" pageType="203">Card
(PDF)</f:link.action>

If you do need to use additionalParams, I think the syntax is a json string
array, like additionalParams="{param1 : 'val1', param2 : 'val2'}"

I think there's also a way in TS to set the default format (ie pdf) based on
the pageType, so that whenever you use type=203 it will always pull .pdf
templates (if that's desired).  I think it's by adding "format = pdf" to the
config.


>
> --
> kind regards,
> Franz Koch
>
>

So if pagetype is your problem, hopefully that will help?

-- 
Christine Gerpheide   ✈ larissa, greece   @ www.pheide.com


More information about the TYPO3-project-typo3v4mvc mailing list