Manaus Posted January 22 Share Posted January 22 Hi, I have a page where I have placed a custom field that has Lorem Ipsum as the label and lorem_ipsum as the name. On the page hosting that field, I would like to print the label. How can I do this? I tried `$page->lorem_ipsum->label` but it doesn't work. To investigate the problem further, I also tried `$page->lorem_ipsum->body`, in case there were several methods to access the various properties of the field. I also tried `name`, but the CMS still considers the field `$page->lorem_ipsum` as non-object. Can I print out the field name without going through the `$fields` object? Thanks Link to comment Share on other sites More sharing options...
netcarver Posted January 22 Share Posted January 22 Does this work... echo $page->lorum_ipsum->getLabel(); ? Also, take a look at Bernhard's post here... 1 Link to comment Share on other sites More sharing options...
bernhard Posted January 23 Share Posted January 23 17 hours ago, Manaus said: Can I print out the field name without going through the `$fields` object? Yes, but why? 1 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