[TYPO3-english] Extbase/Fluid frontend plugin - insert variable in url

Reginaldo Arredondo reggiearre at googlemail.com
Wed Dec 29 07:17:31 CET 2010


Hi List,

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 shown 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:

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?

For example if someone searches by the booking number SA001 the url should
be something 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&tx_rafreighttracking_publicsearch[bookingnumber]=SA001&tx_rafreighttracking_publicsearch[billnumber]=&tx_rafreighttracking_publicsearch[containernumber]=&cHash="cHash
string"

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

Thanks for any help,
Reginaldo


More information about the TYPO3-english mailing list