Page 1 of 1

Display text/plain data

Posted: Wed Mar 10, 2010 6:51 am
by yvan02
I'm developing un paiement gateway module for paiement in french bank CIC-CMUT.

My problem is the return interface to bank.

If paiement success the bank return post data on this url :
http://www.XXXXXX.biz/babystop/index.ph ... eturnid=74

in script action.confirmation_paiement.php i must return to bank some data in mode "Content-type: text/plain":

the text data to return is per example :
version=2 cdr=1 651110*****3.0***************

A echo display the data inside the template (with html code) because smarty process the template.

How can i display the data only in text/plain, no html code, not process smarty template ? Any idea ?

Re: Display text/plain data

Posted: Wed Mar 10, 2010 8:23 am
by cyberman
yvan02 wrote: How can i display the data only in text/plain, no html code, not process smarty template ? Any idea ?
Have you read this?

http://www.smarty.net/manual/en/languag ... iteral.php

8)

Re: Display text/plain data

Posted: Wed Mar 10, 2010 10:41 am
by yvan02
i now the literal smarty tag, but i'm in a php module action script, not in a template

Re: Display text/plain data

Posted: Wed Mar 10, 2010 11:17 am
by cyberman
yvan02 wrote: A echo display the data inside the template (with html code) because smarty process the template.

How can i display the data only in text/plain, no html code, not process smarty template ? Any idea ?
Smarty is only a template engine, so devs can define the output.

If there is html Smarty will output, if there's no html, Smarty will output plain text.

By the way - if a Smarty value contains html it's possible to filter it with a modifier like

Code: Select all

{$value|strip_tags}
(Yeah, you can use php commands as modifier ...)