brentnl wrote:Question one; if I edit the field definition, there is also a field called 'template' where at default the following line is being displayed;
\$1:
{$fielddef.name}: {$fielddef.value|implode:','}
, but changing it doesn't effect a thing. Also putting another value at the 'seperator' field doesn't seem to do anything?
It's not documented as it is still experimental, but to use the field definition template in a detail or summary template the you'll need to call the item using the
View method:
brentnl wrote:Queston two, the main question; how do I manage to get rid of the comma's seperating the array? I'm calling the field in a Core::Page template with;
\$1:
{$item->distance|implode:''}
but nothing returns. If I remove the implode-part, it's getting displayed with the comma-seperation.
The comma isn't separating an array: if has commas it is a string representation of an array. Implode in PHP
joins the comma separated string in an array which, in a sense,
is what you want, but is not displayable
per se... You'll need to iterate through the array with a
foreach.
Code: Select all
{foreach $item->distance|implode:'' as $one}{$one}{/foreach}
[/s]Note: this was not exact! Look at velden's post

!
Thanks velden for the heads up

!