Access attributes in Pages custom fields like label (name), etc
- Replies 4
- Views 1.7k
- Created
- Last Reply
Top Posters In This Topic
-
Jimi Wikman 2 posts
-
sgimc 2 posts
Popular Days
Most Popular Posts
-
ooh! This is a great idea. Thanks for offering it. A nice workaround. I'll set up {$label} for the 'listing' type and see what I can do. I wanted to do this in a somewhat automated way, though I
-
In case someone stumbles on this in the future, here is a way to get the Custom Field name in any database: Remember to replace the <database_id> with the id for your Pages database, so for da
Hi there, I posted this at the IPS communities, but I thought it might get a little more direct attention over here.
In a Pages DB display template, I can get custom field data with
{$record->customFieldDisplayByKey('programs')|raw}And In the Display are of the field, I can set the {$label} and the {$value} as well as use the {$formValue}
But what I really need to do is access the custom field's Name (label) and Description from within the Record Display template.
Is that possible?Something like:
{{foreach $record->customFieldsForDisplay('display_top') as $fieldId => $fieldValue}} custom field key: {$fieldId} // this doesn't exist, does it? {$record->customFieldDisplayByKey($fieldId,'LABEL')|raw} {$record->customFieldDisplayByKey($fieldId,'DESCRIPTION')|raw} // this doesn't exist {{endforeach}}Thanks.