[solved] ListIt2 - get name of specific field definition

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
Cerulean
Forum Members
Forum Members
Posts: 172
Joined: Mon Nov 01, 2010 8:56 am

[solved] ListIt2 - get name of specific field definition

Post 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?
Last edited by Cerulean on Mon Jul 21, 2014 7:42 am, edited 1 time in total.
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: ListIt2 - get name of specific field definition

Post 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.
Cerulean
Forum Members
Forum Members
Posts: 172
Joined: Mon Nov 01, 2010 8:56 am

Re: ListIt2 - get name of specific field definition

Post by Cerulean »

Brilliant, thanks!
Post Reply

Return to “Modules/Add-Ons”