Access database value in the list template

Martooti

Member
I want to add custom php code in my list template that update the start_date every week for weekly events.

Also I would like to show some elements only if the listing is featured.

Unfortunately when I use $this->_row->data->fb_events___sponsored=='1' it doesn't work. It seems for me like $this->_row->data->fb_events___sponsored give the element not the db value.
When I make echo $this->_row->data->fb_events___sponsored; I am getting the icons from yes/no field.

I tried to make :
Code:
$sponsored= $this->groups['Events']->elements['sponsored'];
echo $sponsored->value;
like in details layout but it returns empty.

How can I access elements value stored in db from list template?

Anyone could help?
 
I found it by accident in calc elements:
it is enought to add _raw to $this->_row->data->fb_events___sponsored :)
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top