Juergen Posted April 29, 2015 Share Posted April 29, 2015 Today I had to output notes in a form at the frontend. This little code snippets show you how it can be done via the API: 1) One language site: $notesofmyfield = $page->fields->get("myfield")->notes; echo $notesofmyfield; 2) On a multilanguage site if ($user->language->name != 'default') { $notes = "notes{$user->language}"; } else { $notes = 'notes'; } $notesofmyfield = $page->fields->get("myfield")->$notes; echo $notesofmyfield; Happy coding!! 3 Link to comment Share on other sites More sharing options...
LostKobrakai Posted April 29, 2015 Share Posted April 29, 2015 There's even this for the multi-language one: $user->language->isDefault() // true or false 1 Link to comment Share on other sites More sharing options...
Juergen Posted May 5, 2015 Author Share Posted May 5, 2015 Oh thats new to me - Thanx for the hint 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