You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In an Advanced Content Type pod you are allowed to create a field with name = 'type'. You can access this field with PHP: $pods->field('type'). However, the magic code {@type} gives the pod name. As process_magic_tags() has this code: if ( 'type' == $field_name ) $value = $this->pod; - this seems to be by design. In this case should you allow the creation of a field with name = 'type' when it cannot be accessed with a magic tag.
The text was updated successfully, but these errors were encountered:
{@type} is indeed a vestige from Pods 1.x days. I'm not entirely sure if it's ever even been used by anyone... I'm thinking we should deprecate it for 2.x and have it only evaluate as the pod name when using get_field or deprecated template functions.
My feelings is that the behavior of $pods->field('type') (which returns the value of the field named 'type') and {@type} should be identical so I vote for deprecation.
{@type} is indeed a vestige from Pods 1.x days. I'm not entirely sure if it's ever even been used by anyone... I'm thinking we should deprecate it for 2.x and have it only evaluate as the pod name when using get_field or deprecated template functions.
—
Reply to this email directly or view it on GitHub.
In an Advanced Content Type pod you are allowed to create a field with name = 'type'. You can access this field with PHP: $pods->field('type'). However, the magic code
{@type}
gives the pod name. As process_magic_tags() has this code: if ( 'type' == $field_name ) $value = $this->pod; - this seems to be by design. In this case should you allow the creation of a field with name = 'type' when it cannot be accessed with a magic tag.The text was updated successfully, but these errors were encountered: