Categories > TinyButStrong general >

Merge without a block

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Getterac7
Date: 2014-09-24
Time: 18:34

Merge without a block

I would like to just do a simple merge with something like:
Your address is: <<User Address>>

I tried things such as:
$replace = array(
    'User Name' => 'Frank West',
    'User Address' => '123 Fake St.');
$TBS->MergeBlock('', 'array', $replace);
// or...
$TBS->MergeField('', $relpace);

Is this possible?

Thanks.
By: Skrol29
Date: 2014-09-24
Time: 21:16

Re: Merge without a block

Template:
Your address is: [user.address]

PHP:
$data = array(
    'name' => 'Frank West',
    'address' => '123 Fake St.');
$TBS->MerfeField('user', $data);
By: Getterac7
Date: 2014-09-24
Time: 21:37

Re: Merge without a block

@Skrol29,
Thank you for the reply, but I cannot change the template, as it is an existing system integrated with other systems.
The template merge fields must look exactly like I have put above:
Your name is: <<User Name>>
Your address is: <<User Address>>
By: Skrol29
Date: 2014-09-25
Time: 00:13

Re: Merge without a block

The  a simple str_replace() should work.