[TYPO3-english] Set additionalHeaders dinamically for mbl_newsevent

Peter Ruijter peter.ruijter at gmail.com
Mon Nov 12 10:27:09 CET 2012


Hi Tomiţă,

I was wondering if you had already a solution for your Typoscript problem.
I've looked another time into you code and saw that you're using .value to
display the value of the tt_news GET variable. This will never work, you
should use ".dataWrap" instead, the code below will do the job for you.

singleicsevent {
    config {
        disableAllHeaderCode = 1
        additionalHeaders = TEXT
        additionalHeaders.dataWrap = Content-type:text/ics |
Content-Disposition:    attachment;
filename="Event_{GPvar:tx_ttnews|tt_news}.ics"
        no_cache = 1
        xhtml_cleaning = 0
    }
}

Because the TEXT object supports stdWrap, you can use dataWrap.

Best regards,

Peter Ruijter
*Peter Industries*
www.peterindustries.com



On Wed, Nov 7, 2012 at 3:13 PM, Tomiţă MILITARU
<tomita.militaru at gmail.com>wrote:

> On Wed, Nov 7, 2012 at 3:13 PM, Peter Ruijter <peter.ruijter at gmail.com
> >wrote:
>
> > Hi Tomiţă,
> >
> > I don't know which TYPO3 version you're using, but since 4.5 GPvar:
> > is deprecated, you should use {GP:tx_ttnews|tt_news} now.
> >
>
> Hello Peter,
>
> I am using 4.4, so it would still work.
>
> Thanks.
>
>
> > --
> >
> > Best regards,
> >
> > Peter Ruijter
> > *Peter Industries*
> > www.peterindustries.com
> >
> >
> > On Wed, Nov 7, 2012 at 1:19 PM, Tomiţă MILITARU
> > <tomita.militaru at gmail.com>wrote:
> >
> > > I would like to change dinamically the headers of a page that downloads
> > an
> > > ICS file using the extension mbl_newsevent. As you may know, usually
> the
> > > ICS filename is Event.ics and I want to change that to Event_1234.ics
> > > (where 1234 is the the tt_news uid). My code for that (only the
> config):
> > >
> > > singleicsevent {
> > >     config {
> > >         disableAllHeaderCode = 1
> > >         additionalHeaders = TEXT
> > >         additionalHeaders.value = Content-type:text/ics |
> > > Content-Disposition:    attachment;
> > > filename="Event_{GPvar:tx_ttnews|tt_news}.ics"
> > >         additionalHeaders.insertData = 1
> > >         no_cache = 1
> > >         xhtml_cleaning = 0
> > >     }
> > > }
> > >
> > > But that does not work as additionalHeaders is of type string and that
> is
> > > ignored. Any suggestions how I can do that only with typoscript?
> > >
> > > Tomita
> > > _______________________________________________
> > > TYPO3-english mailing list
> > > TYPO3-english at lists.typo3.org
> > > http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
> > >
> > _______________________________________________
> > TYPO3-english mailing list
> > TYPO3-english at lists.typo3.org
> > http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
>
>
>
>
> --
> Engr. Tomiţă MILITARU
> Certified TYPO3 Integrator
> Tel. +40741064681
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
>


More information about the TYPO3-english mailing list