Developer forum

Forum » PIM » Dynamicweb.Ecommerce.FieldTypeProviders.ConcatProvider

Dynamicweb.Ecommerce.FieldTypeProviders.ConcatProvider

Michael Knudsen
Reply

Hello forum,

- I would like to build a list of values using the ConcatProvider and everything works fine as long all fields have a value, but when only some of the fields have a value it returns a uncompleted list with empty bullets.

Have anyone some tips or tricks to share?

<ul>
<li>{Field1}</li>
<li>{Field2}</li>
<li>{Field3}</li>
<li>{Field4}</li>
<li>{Field5}</li>
</ul>

If only Field1 + Field3 + Field5 have values, the result would look like this:

  • Field1Value
  •  
  • Field3Value
  •  
  • Field5Value

Br. Michael Knudsen


Replies

 
Søren Jensen Dynamicweb Employee
Søren Jensen
Reply
This post has been marked as an answer

Hi Michael,

You need to use square brackets [xx] around your field syntax, then they will disappear if the field are empty..

Example:

Product name:  [<b>{ProductName}</b>]<BR />
Product number:  [<b>{ProductNumber}</b>]<BR />
<ul>
[<li><b>Price</b>{ProductPrice}</li>]
[<li><b>Stock</b>{ProductStock}</li>]
[<li><b>Weight</b>{ProductWeight}</li>]
[<li><b>Season</b>{Season}</li>]
</ul>

/Søren

Votes for this answer: 1

 

You must be logged in to post in the forum