{"action":"closed","issue":{"url":"https://api.github.com/repos/picocms/Pico/issues/305","repository_url":"https://api.github.com/repos/picocms/Pico","labels_url":"https://api.github.com/repos/picocms/Pico/issues/305/labels{/name}","comments_url":"https://api.github.com/repos/picocms/Pico/issues/305/comments","events_url":"https://api.github.com/repos/picocms/Pico/issues/305/events","html_url":"https://github.com/picocms/Pico/issues/305","id":121866774,"number":305,"title":"[Feature Idea] Pass $_GET to Twig template","user":{"login":"smcdougall","id":12779160,"avatar_url":"https://avatars.githubusercontent.com/u/12779160?v=3","gravatar_id":"","url":"https://api.github.com/users/smcdougall","html_url":"https://github.com/smcdougall","followers_url":"https://api.github.com/users/smcdougall/followers","following_url":"https://api.github.com/users/smcdougall/following{/other_user}","gists_url":"https://api.github.com/users/smcdougall/gists{/gist_id}","starred_url":"https://api.github.com/users/smcdougall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smcdougall/subscriptions","organizations_url":"https://api.github.com/users/smcdougall/orgs","repos_url":"https://api.github.com/users/smcdougall/repos","events_url":"https://api.github.com/users/smcdougall/events{/privacy}","received_events_url":"https://api.github.com/users/smcdougall/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/picocms/Pico/labels/type:%20Idea","name":"type: Idea","color":"c2e0c6"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/picocms/Pico/milestones/3","html_url":"https://github.com/picocms/Pico/milestones/Version%201.1.0","labels_url":"https://api.github.com/repos/picocms/Pico/milestones/3/labels","id":1398298,"number":3,"title":"Version 1.1.0","description":"","creator":{"login":"PhrozenByte","id":920356,"avatar_url":"https://avatars.githubusercontent.com/u/920356?v=3","gravatar_id":"","url":"https://api.github.com/users/PhrozenByte","html_url":"https://github.com/PhrozenByte","followers_url":"https://api.github.com/users/PhrozenByte/followers","following_url":"https://api.github.com/users/PhrozenByte/following{/other_user}","gists_url":"https://api.github.com/users/PhrozenByte/gists{/gist_id}","starred_url":"https://api.github.com/users/PhrozenByte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PhrozenByte/subscriptions","organizations_url":"https://api.github.com/users/PhrozenByte/orgs","repos_url":"https://api.github.com/users/PhrozenByte/repos","events_url":"https://api.github.com/users/PhrozenByte/events{/privacy}","received_events_url":"https://api.github.com/users/PhrozenByte/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":4,"state":"open","created_at":"2015-11-06T19:18:09Z","updated_at":"2016-09-17T22:09:52Z","due_on":null,"closed_at":null},"comments":10,"created_at":"2015-12-12T17:09:07Z","updated_at":"2016-09-17T22:09:52Z","closed_at":"2016-09-17T22:09:52Z","body":"This seems like something that could be *immensely* powerful in templates.  I've already got two features for [NotePaper](https://github.com/smcdougall/NotePaper) that are planned around using GET variables in URLs.  This is however something that Pico doesn't do at the moment.\r\n\r\nI was able to code this with one line in the `DummyPlugin`, by adding\r\n`$twigVariables['TwigGetUrl'] = $_GET;`\r\nto the `onPageRendering()` function.\r\n\r\nWhile I could include a very basic plugin like this in my theme, it seems like kind of a waste, especially for something that could benefit others.\r\n\r\nBest of all, since it's just passing a variable, it doesn't interfere with or change anything in Pico.  It does harmlessly pass along the page id used by the routing system, but that doesn't seem like it would really cause a problem (since most use cases would be searching for a specific item by name).\r\n\r\nThe only other issue I could think of would be that a theme developer would need to use the `rewrite_url` variable to determine whether to use a `?` or an `&` in their code (if they want to support both Rewriting and the Routing System anyway).\r\n\r\n\r\nWhat do you guys think about this idea?  I'd love to see this as a feature, and it seems simple enough to do."}}
{"actor":{"display_login":"PhrozenByte"}}