Share » Forums » Developer » Content-Disposition for my template?

Content-Disposition for my template?

Content-Disposition for my template?

Thursday 26 May 2011 6:28:00 am - 4 replies

Author Message

Steven E. Bailey

Thursday 26 May 2011 9:18:05 am

This is trivial if you get the content through an extension - I've done many to output xml,vcards etc... but, I don't think you can change the content disposition from a template.  It's always AFAIR coming from php.

Certified eZPublish developer
http://ez.no/certification/verify/396111

Available for ezpublish troubleshooting, hosting and custom extension development: http://www.leidentech.com

Marko Žmak

Thursday 26 May 2011 9:25:45 am

If you don't want to make an extension you could use the wrap operator:

  • http://projects.ez.no/wrap_operator

to execute the header() PHP function.

P.S. I would advise you caution when using the wrap operator, and not to get carried away with it.

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Ivan Švogor

Thursday 26 May 2011 2:21:07 pm

How about go into index.php, and intercept the echo that writes out the page. Search for my custom tag, in my template e.g. <downloadable/> and if i find this, printout disposition header, and if not, carry on with page? - how bad is this quick fix on performance? (I did it, as a temporary solution, I will tryout wrap_operator)

Marko Žmak

Thursday 26 May 2011 3:05:25 pm

How about go into index.php, and intercept the echo that writes out the page. Search for my custom tag, in my template e.g. <downloadable/> and if i find this, printout disposition header, and if not, carry on with page? - how bad is this quick fix on performance? (I did it, as a temporary solution, I will tryout wrap_operator)

It's not only performance issue, but the fact you are hacking the files of eZP installation. It's not really a clean way and you'll have to watch out for upgrades...

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu