how to get the value from database by fieldname in tpl file

Simple Question. like for get the filed name we write,

{{$colData.field.name}}

for getting the value what i need to write, plz figure me out this solution. :unsure:

Is it not just : {{$colData.field.val}} or {{$colData.field.value}}

You can assign a variable in the view like this:

$this->ss->assign(“testvalue”,$test);

and then get it in the smarty template like this:

{$testvalue}

OK.
Thanks Andy, for that solution. I also find another solution to solve this , and it is perfactly working.

this one, BY this also , I can fetch field value.

$fields.{{$colData.field.name}}.value

cheers.

1 Like