{"action":"opened","issue":{"url":"https://api.github.com/repos/jarednova/timber/issues/703","labels_url":"https://api.github.com/repos/jarednova/timber/issues/703/labels{/name}","comments_url":"https://api.github.com/repos/jarednova/timber/issues/703/comments","events_url":"https://api.github.com/repos/jarednova/timber/issues/703/events","html_url":"https://github.com/jarednova/timber/issues/703","id":110356434,"number":703,"title":"How to handle conditional entry fields at controller level","user":{"login":"benkutil","id":228373,"avatar_url":"https://avatars.githubusercontent.com/u/228373?v=3","gravatar_id":"","url":"https://api.github.com/users/benkutil","html_url":"https://github.com/benkutil","followers_url":"https://api.github.com/users/benkutil/followers","following_url":"https://api.github.com/users/benkutil/following{/other_user}","gists_url":"https://api.github.com/users/benkutil/gists{/gist_id}","starred_url":"https://api.github.com/users/benkutil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benkutil/subscriptions","organizations_url":"https://api.github.com/users/benkutil/orgs","repos_url":"https://api.github.com/users/benkutil/repos","events_url":"https://api.github.com/users/benkutil/events{/privacy}","received_events_url":"https://api.github.com/users/benkutil/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-08T01:54:43Z","updated_at":"2015-10-08T01:54:43Z","closed_at":null,"body":"What's the best way to do something like this:\r\n\r\n```\r\nif (get_field('entry_heading')):\r\n  $context['heading'] = get_field('entry_heading');\r\nelse:\r\n  $context['heading'] = $post->post_title;\r\nendif;\r\n```\r\n\r\nWhere the entry is saved in $context['post'].\r\n\r\nIdeally, in to use `{{ post.title }}`, and have it updated by the above conditional."}}