|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
dhodgman1 Smarty n00b
Joined: 02 Jun 2021 Posts: 1
|
Posted: Wed Jun 02, 2021 7:06 am Post subject: Generating carriage return/line feeds in Word documents |
|
|
Hi all (my first Smarty post),
I'm using Smarty as part of the Flexidocs document generation tool and am very frustrated that I can't seem to convert line feeds in a text field, as they are stored in a database, into a carriage return/line feed that will show up in the Word document that is being generated. Any line feeds that my users enter in our system disappear and a long, concatenated string is rendered.
I've tried regex_replace with many combinations of replacement characters, none of which are honoured when the document is generated.
e.g. Code: | {$groupProducts.description|regex_replace:'/[\n]/':"$crlf"} |
where I've tried setting $crlf to various combinations of characters.
BTW, in this set up, I don't have the option of working in straight PHP before the data is delivered to Smarty.
Would greatly appreciate any help.
Dave
P.S. I believe we're using Smarty 3 |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Sat Jun 05, 2021 11:04 pm Post subject: |
|
|
Add somewhere in your template to be sure. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|