Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Pods Template show Field Label and Value #3963

Closed
PodsBot opened this issue Jan 24, 2017 · 4 comments
Closed

Feature Request: Pods Template show Field Label and Value #3963

PodsBot opened this issue Jan 24, 2017 · 4 comments
Labels
Type: Enhancement Enhancements to features that already exist, but are not major additions Type: Feature Features that add entirely new functionality that was not there before

Comments

@PodsBot
Copy link
Collaborator

PodsBot commented Jan 24, 2017

Feature Request: Pods Template show Field Label and Value submitted via Slack by jimtrue

@SubCon
Copy link

SubCon commented Jan 24, 2017

Ok so Jim asked me to add some info here:
The way I see it, there should be an option to output field label using magic tags just like the value.
{@field_label}, but technically it could be messy, so Jim suggested it to be like this: {@field.get_label}.
Should be easy enough since the $obj->fields already available.

@sc0ttkclark
Copy link
Member

Sounds like an easy solution to me, however I think we'll want to stick with something like this:

  • {@pods_field.field_name.label} - Output field label
  • {@pods_field.field_name.description} - Output field description

Maybe some others field options, but not sure yet what others would be useful to include support for.

@jimtrue
Copy link
Contributor

jimtrue commented Jan 24, 2017

As we currently have things, that type of syntax would be confused with 'traversal' notation. Typically, when we call a specific function against a field, we do it in the manner:
{@pods_field,function}

@jimtrue jimtrue added Type: Enhancement Enhancements to features that already exist, but are not major additions Type: Feature Features that add entirely new functionality that was not there before labels Jan 24, 2017
@sc0ttkclark
Copy link
Member

We've got some special notation already in place which we would tie into here.

Doc: http://pods.io/docs/code/pods/field/

We would add the elseif after this one:
https://github.com/pods-framework/pods/blob/2.x/classes/Pods.php#L959-L978

@pods-framework pods-framework locked and limited conversation to collaborators Aug 11, 2022
@sc0ttkclark sc0ttkclark converted this issue into discussion #6669 Aug 11, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
Type: Enhancement Enhancements to features that already exist, but are not major additions Type: Feature Features that add entirely new functionality that was not there before
Projects
None yet
Development

No branches or pull requests

4 participants