{"action":"created","issue":{"url":"https://api.github.com/repos/torchbox/wagtail/issues/2469","repository_url":"https://api.github.com/repos/torchbox/wagtail","labels_url":"https://api.github.com/repos/torchbox/wagtail/issues/2469/labels{/name}","comments_url":"https://api.github.com/repos/torchbox/wagtail/issues/2469/comments","events_url":"https://api.github.com/repos/torchbox/wagtail/issues/2469/events","html_url":"https://github.com/torchbox/wagtail/issues/2469","id":147211250,"number":2469,"title":"Provide page in the context of StreamField blocks","user":{"login":"timorieber","id":1807610,"avatar_url":"https://avatars.githubusercontent.com/u/1807610?v=3","gravatar_id":"","url":"https://api.github.com/users/timorieber","html_url":"https://github.com/timorieber","followers_url":"https://api.github.com/users/timorieber/followers","following_url":"https://api.github.com/users/timorieber/following{/other_user}","gists_url":"https://api.github.com/users/timorieber/gists{/gist_id}","starred_url":"https://api.github.com/users/timorieber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timorieber/subscriptions","organizations_url":"https://api.github.com/users/timorieber/orgs","repos_url":"https://api.github.com/users/timorieber/repos","events_url":"https://api.github.com/users/timorieber/events{/privacy}","received_events_url":"https://api.github.com/users/timorieber/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/torchbox/wagtail/labels/Enhancement","name":"Enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/torchbox/wagtail/labels/Ready%20to%20develop!","name":"Ready to develop!","color":"eb6420"},{"url":"https://api.github.com/repos/torchbox/wagtail/labels/Streamfield","name":"Streamfield","color":"8777ED"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-10T10:12:56Z","updated_at":"2016-04-13T09:00:17Z","closed_at":null,"body":"I came across the limitation that the page is missing in the context of related StreamField blocks when rendering the blocks template several times. A typical use case is when you need to implement an intro block, where the page title and author should be displayed.\r\n\r\nSo far I was not able to solve this as a complete StreamField block. My implementation is a StreamField block anyway, but not using the blocks rendering mechanism. Instead I check for this block type and call a template with `{% include %}` and the necessary data as parameters.\r\n\r\nThe hurdle occurs in the majority of cases when you need to display data from builtin fields of Wagtails `Page` model. Otherwise you would be able to design it like it should be.\r\n\r\nThis issue is opened in addition to #1743 to clearly separate the discussion between the different requirements to have `request` and `page` available in the template context. I fully agree with https://github.com/torchbox/wagtail/issues/1743#issuecomment-144029475, though."},"comment":{"url":"https://api.github.com/repos/torchbox/wagtail/issues/comments/209316719","html_url":"https://github.com/torchbox/wagtail/issues/2469#issuecomment-209316719","issue_url":"https://api.github.com/repos/torchbox/wagtail/issues/2469","id":209316719,"user":{"login":"gsstver","id":4941710,"avatar_url":"https://avatars.githubusercontent.com/u/4941710?v=3","gravatar_id":"","url":"https://api.github.com/users/gsstver","html_url":"https://github.com/gsstver","followers_url":"https://api.github.com/users/gsstver/followers","following_url":"https://api.github.com/users/gsstver/following{/other_user}","gists_url":"https://api.github.com/users/gsstver/gists{/gist_id}","starred_url":"https://api.github.com/users/gsstver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gsstver/subscriptions","organizations_url":"https://api.github.com/users/gsstver/orgs","repos_url":"https://api.github.com/users/gsstver/repos","events_url":"https://api.github.com/users/gsstver/events{/privacy}","received_events_url":"https://api.github.com/users/gsstver/received_events","type":"User","site_admin":false},"created_at":"2016-04-13T09:00:17Z","updated_at":"2016-04-13T09:00:17Z","body":"I solved this case in one project. It's very useful."}}