{"action":"created","issue":{"url":"https://api.github.com/repos/panique/huge/issues/699","labels_url":"https://api.github.com/repos/panique/huge/issues/699/labels{/name}","comments_url":"https://api.github.com/repos/panique/huge/issues/699/comments","events_url":"https://api.github.com/repos/panique/huge/issues/699/events","html_url":"https://github.com/panique/huge/issues/699","id":101734909,"number":699,"title":"(Question) Creating Pages Outside of the Controller","user":{"login":"videsignz","id":13843898,"avatar_url":"https://avatars.githubusercontent.com/u/13843898?v=3","gravatar_id":"","url":"https://api.github.com/users/videsignz","html_url":"https://github.com/videsignz","followers_url":"https://api.github.com/users/videsignz/followers","following_url":"https://api.github.com/users/videsignz/following{/other_user}","gists_url":"https://api.github.com/users/videsignz/gists{/gist_id}","starred_url":"https://api.github.com/users/videsignz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/videsignz/subscriptions","organizations_url":"https://api.github.com/users/videsignz/orgs","repos_url":"https://api.github.com/users/videsignz/repos","events_url":"https://api.github.com/users/videsignz/events{/privacy}","received_events_url":"https://api.github.com/users/videsignz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-18T19:48:50Z","updated_at":"2015-08-18T21:24:41Z","closed_at":null,"body":"I am new to the world of MVC and have explored HUGE quite extensively and can understand how it all works for the most part.\r\n\r\nI have a question though.\r\n\r\nThe Issue:\r\nFirst off...Say I have a set of pages that are the base of my website (Public Pages) such as **About Us, Contact Us, Products, Services** and so on. It seems a bit overkill to have to write Controller Functions for all of these \"Public Pages\" especially when the number of pages could be many.\r\n\r\nSecondly...when visiting a page such as **mydomain.com/contact** it seems a bit unappealling to have to have a controller name in there (ie: **mydomain.com/controller/contact**).\r\n\r\nMy Attempt:\r\nWith a bit of messing with the **`core/application.php`** file, specifically in the **`else`** statements that normally push a 404 page, I created a function to check if an actual page exists, and if so to require that page instead of showing a 404. Works perfect...*BUT.*..I lose all access to the Huge Classes.\r\n\r\nI still need the classes available to take advantage of a couple of the **`LoginModel::function()`** functions to display a user bar at the top of each page and to also use the *loginWithCookie* function.\r\n\r\nIdeas:\r\nSo, I am wondering what I can do to solve this.\r\nMy Idea is to have some sort of `special/` folder that allows any page inside of it to have access to the classes yet would not need to be rendered by a controller. Along with that, a mod rewrite that would mask the `special/` folder to take something like **mydomain.com/special/contact.php** and show it as **mydomain.com/contact.php**\r\n\r\nNote:\r\nI am a new member to Github (signed up just to ask this question) and can not figure out how to tag this as a question. I also do not know if this is the right place to post a question. I apologize if it is not.\r\n\r\nThank you Panique for the awesome work you have put into this project!\r\nMaybe I am overlooking an easy way to achieve this, or even overthinking it...any ideas would be great!"},"comment":{"url":"https://api.github.com/repos/panique/huge/issues/comments/132355923","html_url":"https://github.com/panique/huge/issues/699#issuecomment-132355923","issue_url":"https://api.github.com/repos/panique/huge/issues/699","id":132355923,"user":{"login":"ajborn","id":5026351,"avatar_url":"https://avatars.githubusercontent.com/u/5026351?v=3","gravatar_id":"","url":"https://api.github.com/users/ajborn","html_url":"https://github.com/ajborn","followers_url":"https://api.github.com/users/ajborn/followers","following_url":"https://api.github.com/users/ajborn/following{/other_user}","gists_url":"https://api.github.com/users/ajborn/gists{/gist_id}","starred_url":"https://api.github.com/users/ajborn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajborn/subscriptions","organizations_url":"https://api.github.com/users/ajborn/orgs","repos_url":"https://api.github.com/users/ajborn/repos","events_url":"https://api.github.com/users/ajborn/events{/privacy}","received_events_url":"https://api.github.com/users/ajborn/received_events","type":"User","site_admin":false},"created_at":"2015-08-18T21:24:41Z","updated_at":"2015-08-18T21:24:41Z","body":"I think most of what you mentioning is preference.\n\nYou should always keep to the architecture of the framework and use a\ncontroller to render all pages. Even if they do not have functionality.\n\nWhat if you need to secure one of those pages in the future for logged in\nusers?\n\nHaving the page rendered from the controller allows for you to access those\nfunctions easily.\n\nAlso having the pages rendered from a controller allow the header and\nfooters to be used dynamically.\n\nThe way you recommend breaks architecture and black boxes pages.\n\nIf your not much of a back end programmer, I recommend word press.\nOn Aug 18, 2015 1:42 PM, \"videsignz\" <notifications@github.com> wrote:\n\n> As an added idea, apart from the above, it seems like the dashboard\n> views/controller should contain all of the show/change/edit features found\n> in the login section. Leaving the login functions clean and simple, only\n> showing the pages necessary to sign in/register/and verify. Make sense?\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/panique/huge/issues/699#issuecomment-132344475>.\n>\n"}}