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 :
like in details layout but it returns empty.
How can I access elements value stored in db from list template?
Anyone could help?
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;
How can I access elements value stored in db from list template?
Anyone could help?