[TYPO3-mvc] frontend plugin and pdf_generator2

Reginaldo Arredondo reggiearre at googlemail.com
Wed Dec 29 10:22:28 CET 2010


Hi to  everyone,

I developed a frontend plugin based on extbase / fluid. The plugin shows a
form to search bookings according to either bookingnumber, billnumber or
containernumber. When clicking on the submit button, the details of the
searched single booking are shown.
The url of the single view looks like this:
http://127.0.0.1/bn_quicksite_2.1/customer-service/freight-tracking/?tx_rafreighttracking_publicsearch[action]=show&tx_rafreighttracking_publicsearch[controller]=Booking&cHash=711ae9d5d2c2459aaa7cb58f53233370

(
http://127.0.0.1/bn_quicksite_2.1/customer-service/freight-tracking/
?tx_rafreighttracking_
publicsearch[action]=show
&tx_rafreighttracking_publicsearch[controller]=Booking
&cHash="cHash string"
)

In this single view, there is a link to generate a PDF with pdf_generator2
and tv_pdfgen (for templa voila). I created the link like this:
(ext template setup:)

lib.empty_fce = IMAGE
lib.empty_fce.file = fileadmin/images/pdf_icon.jpg
lib.empty_fce.file.width = 60px
lib.empty_fce.wrap = <div id="pdf_generator2_link"> | </div>
lib.empty_fce.altText = generate PDF document
lib.empty_fce.stdWrap.postUserFunc = tx_pdfgenerator2->makePdfLink
lib.empty_fce.stdWrap.postUserFunc.target = _blank

(empty_fce is what the name suggests: an empty FCE I use for things like
this)

When clicking the button, an exception is thrown: An argument
"bookingnumber" does not exist for this request.

How can I manage to insert a variable in the url so pdf_generator2 knows
which single view to generate as PDF?

Is there a way to solve the problem with realurl? I tried different
configurations, but I didn´t manage to display the bookingnumber in the url.
The bookingnumber / billnumber / containernumber may be displayed in the
url. It´s no secret information.

realurl configuration:

'booking' => array (
                    array (
                        'GETvar' =>
'tx_rafreighttracking_publicsearch[action]',
                        'valueMap' => array(
                            'find' => 'index',
                            'display' => 'show',
                            ),
                        ),
                    array (
                        'GETvar' =>
'tx_rafreighttracking_publicsearch[controller]',
                        'valueMap' => array(
                            'details' => 'Booking',
                            'bookingdetails' => 'Bookingdetails',
                            ),
                        ),
),

This converts the url to the following:
http://127.0.0.1/bn_quicksite_2.1/customer-service/freight-tracking/booking/display/details/

Now I just need the bookingnumber (or billnumber or containernumber) as
additional parameter like this (for the bookingnumber SA001) :
http://127.0.0.1/bn_quicksite_2.1/customer-service/freight-tracking/booking/display/details/sa001/

The url should not be cached since the information changes frequently.

How could I do that?

Thanks for any help,
Reginaldo


More information about the TYPO3-project-typo3v4mvc mailing list