New Line in plain text emails

Author Message

Andreas Adelsberger

Thursday 29 May 2008 2:54:38 am

hi,

i want to achieve a format like this:

Your Order:

Item 1
Item 2
Item 3
--------------------------------------------
Sum

but with this code:

{"Deine Bestellung"|i18n("design/standard/shop")|upcase()}

{section name=ProductItem loop=$order.product_items show=$order.product_items sequence=array(bglight,bgdark)}

{$ProductItem:item.object_name} 

{/section}

...I get

Item 1

Item 2

What are the parsing rules here? Any hints?

---------------------------------------
Styleflasher New Media OG
Websites. Games/Multimedia.

Maxime Thomas

Sunday 01 June 2008 11:46:19 pm

Hi,

I'm surprised by the way you are doing templates files.
There's a new template which depreciates the section structure.
More here :

http://ez.no/doc/ez_publish/technical_manual/4_0/reference/template_control_structures/deprecated/section
http://ez.no/doc/ez_publish/technical_manual/4_0/reference/template_control_structures/looping/foreach

If you want to show what is in an object or an array, use that :

http://ez.no/doc/ez_publish/technical_manual/4_0/reference/template_operators/miscellaneous/attribute

Maxime Thomas
maxime.thomas@wascou.org | www.wascou.org | http://twitter.com/wascou

Company Blog : http://www.wascou.org/eng/Company/Blog
Technical Blog : http://share.ez.no/blogs/maxime-thomas

Andreas Adelsberger

Monday 02 June 2008 12:05:02 am

hi, thanx for your reply. normally i don't use sections in new templates. I just modified an existing template.

I just have problems with the new lines. I will try to change the whole thing to a foreach loop.

The problem is that i get either no new line or two new lines using this section loop.

this code gives me no new line:

{section name=ProductItem loop=$order.product_items show=$order.product_items sequence=array(bglight,bgdark)}
{$ProductItem:item.object_name} 
{/section}

this code gives me two new lines:

{section name=ProductItem loop=$order.product_items show=$order.product_items sequence=array(bglight,bgdark)}

{$ProductItem:item.object_name} 
{/section}

...but I just need one new line like:
Item1
Item2

---------------------------------------
Styleflasher New Media OG
Websites. Games/Multimedia.

Bruce Morrison

Monday 02 June 2008 1:31:54 am

Hi Andreas

There is only one option left :)

{section name=ProductItem loop=$order.product_items show=$order.product_items sequence=array(bglight,bgdark)}
{$ProductItem:item.object_name} 

{/section}

I've had success with this method in the past.

Cheers
Bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

Andreas Adelsberger

Monday 02 June 2008 1:43:03 am

...hmmm, I think I already tried this version. I will check that again and set the post to SOLVED if it worked.

thanx for your help!

---------------------------------------
Styleflasher New Media OG
Websites. Games/Multimedia.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.