DataView fields

mjhaas 17 Jul, 2008
I was having problems getting the "main view record" to display a curly bracket quoted field. eg {myfield}. I think I've fixed it by a slight modification to this file:

administrator\components\com_chronocontact\admin.chronocontact.html.php

Here's the change I made in case anyone else finds it useful.

before:

$dvrecord = $paramsvalues->dvrecord;
foreach ( $names as $fname ) {
    if ( is_a($fname, $row) ) {
        $dvrecord = preg_replace("/\\{".$fname."\\}/", $row->$fname, $dvrecord);
    }
}


after:

$dvrecord = $paramsvalues->dvrecord;
foreach ( $names as $fname ) {
    if ( property_exists ($row, $fname) ) {
        $dvrecord = preg_replace("/\\{".$fname."\\}/", $row->$fname, $dvrecord);
    }
}
This topic is locked and no more replies can be posted.