OLSA Posted September 2, 2016 Share Posted September 2, 2016 I assume that you know how to show field label on front (there is few options), one option is: echo $page->fields->summary->label; // for field with name "summary" But today I had a problem how to show field label depending on the current page template (example: in template "member", "summary" field label is override to "Personal info"). In that case, previous example will not give you desired result. To get field label in that case, this is what works: $page->getField('summary')->label; // result would be "Personal info" Maybe this is helpful for someone. Regards. 4 Link to comment Share on other sites More sharing options...
DaveP Posted February 6, 2017 Share Posted February 6, 2017 @OLSA Very helpful. Thank you. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now