7 Posts
heppner
6 years ago
Topic

Hello,

what I need to do is to compose a link field from other fields. I try to use Code Before Render plugin field but there is a problem because data taken from other fields are objects not strings. For example:

$otherField = $fields['art_address'];
$fields['art_link']->html = '<a href="'.$otherField.'">download</a>';

doesn't work and I get the error:
"Object of class stdClass could not be converted to string"

Maybe there is a different way to do it?

This is the seb_table template so we can't use position override method...
and all data for fields are imported from CSV files.

Regards, Paul.

Get a Book for SEBLOD
1283 Posts
Bucklash
6 years ago
1
Level 1

Hi

So, have you done $fields['art_address']->value/html/typo/link/whatever_it_is_stored_in_object?

Because you do that with $fields['art_link']....

7 Posts
heppner
6 years ago
0
Level 2

Hi,

of course, my fault, it works like charm now,

thanks a lot!

Get a VIP membership