{"action":"created","issue":{"url":"https://api.github.com/repos/Digital-Peak/DPFields/issues/38","repository_url":"https://api.github.com/repos/Digital-Peak/DPFields","labels_url":"https://api.github.com/repos/Digital-Peak/DPFields/issues/38/labels{/name}","comments_url":"https://api.github.com/repos/Digital-Peak/DPFields/issues/38/comments","events_url":"https://api.github.com/repos/Digital-Peak/DPFields/issues/38/events","html_url":"https://github.com/Digital-Peak/DPFields/issues/38","id":155703852,"number":38,"title":"A way of getting values programmatically.","user":{"login":"AndyGaskell","id":91541,"avatar_url":"https://avatars.githubusercontent.com/u/91541?v=3","gravatar_id":"","url":"https://api.github.com/users/AndyGaskell","html_url":"https://github.com/AndyGaskell","followers_url":"https://api.github.com/users/AndyGaskell/followers","following_url":"https://api.github.com/users/AndyGaskell/following{/other_user}","gists_url":"https://api.github.com/users/AndyGaskell/gists{/gist_id}","starred_url":"https://api.github.com/users/AndyGaskell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndyGaskell/subscriptions","organizations_url":"https://api.github.com/users/AndyGaskell/orgs","repos_url":"https://api.github.com/users/AndyGaskell/repos","events_url":"https://api.github.com/users/AndyGaskell/events{/privacy}","received_events_url":"https://api.github.com/users/AndyGaskell/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-05-19T10:27:36Z","updated_at":"2016-05-19T20:52:30Z","closed_at":"2016-05-19T20:52:30Z","body":"This is not so much an issues as a question or perhaps feature request.\r\nI was wondering if there was a way of getting values programmatically?\r\n\r\nSo, as a bit of background, I'm just wanting to pull a field value and display it in a template override.  There is a bit more background on my question at http://joomla.stackexchange.com/questions/16570/dpfields-display-values-in-module\r\n\r\nPreviously I've used FieldsAttatch quite a lot, and there is a nice helper / API solution in that extension which is documented at http://www.fieldsattach.com/index.php/support/api-for-template\r\n\r\nSo really perhaps just a function with two parameters, one for article id or object and one field id or name.  This would return the rendered value.  So, like one of the following...\r\n```\r\n$field_value = DPFieldsHelper::getValue($article_id, $field_id);\r\n$field_value = DPFieldsHelper::getValue($article_id, $field_name);\r\n$field_value = DPFieldsHelper::getValue($article_object, $field_id);\r\n$field_value = DPFieldsHelper::getValue($article_object, $field_name);\r\n```\r\n\r\nSo, I'm wondering...\r\n1) Is there a way to do this, or something similar, in DP Fields?\r\n2) If not, I could write some code and do a Pull request, would that be useful?\r\n\r\nThe closest thing I could find was...\r\n```\r\nJLoader::register('DPFieldsHelper', JPATH_ADMINISTRATOR . '/components/com_dpfields/helpers/dpfields.php');\r\n$fields = DPFieldsHelper::getFields(\"com_content.article\", $article, TRUE);\r\n```\r\n...which is workable, it returns an object with the value as one element, but it'd be neater and quicker if you could just the value on it's own.\r\n\r\nAlso, just to say, thank you for writing this great extension, it's a really nice, clean and elegant solution to adding fields to Joomla.\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/Digital-Peak/DPFields/issues/comments/220448699","html_url":"https://github.com/Digital-Peak/DPFields/issues/38#issuecomment-220448699","issue_url":"https://api.github.com/repos/Digital-Peak/DPFields/issues/38","id":220448699,"user":{"login":"AndyGaskell","id":91541,"avatar_url":"https://avatars.githubusercontent.com/u/91541?v=3","gravatar_id":"","url":"https://api.github.com/users/AndyGaskell","html_url":"https://github.com/AndyGaskell","followers_url":"https://api.github.com/users/AndyGaskell/followers","following_url":"https://api.github.com/users/AndyGaskell/following{/other_user}","gists_url":"https://api.github.com/users/AndyGaskell/gists{/gist_id}","starred_url":"https://api.github.com/users/AndyGaskell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndyGaskell/subscriptions","organizations_url":"https://api.github.com/users/AndyGaskell/orgs","repos_url":"https://api.github.com/users/AndyGaskell/repos","events_url":"https://api.github.com/users/AndyGaskell/events{/privacy}","received_events_url":"https://api.github.com/users/AndyGaskell/received_events","type":"User","site_admin":false},"created_at":"2016-05-19T20:52:30Z","updated_at":"2016-05-19T20:52:30Z","body":"Thanks Laoneo, that sounds good and makes sense."}}