Page 1 of 1

[solved] ListIt2 - get name of specific field definition

Posted: Mon Jul 21, 2014 3:07 am
by Cerulean
I know I can get the value of a specific ListIt2 field definition with {$item->my_field_alias}, but is there a way I can get the name of the field for a given alias?

Re: ListIt2 - get name of specific field definition

Posted: Mon Jul 21, 2014 7:38 am
by velden
Your code is actually a shortcut to:
{$item->fielddefs.my_field_alias->value}

{$item->fielddefs.my_field_alias->name} will show the field name.

{$item->fielddefs.my_field_alias|print_r} will print the object so you can see what properties you can use/show.

Re: ListIt2 - get name of specific field definition

Posted: Mon Jul 21, 2014 7:42 am
by Cerulean
Brilliant, thanks!