diogo Posted April 13, 2012 Share Posted April 13, 2012 I need to make a change on a template while the pages are still being viewed by people. i created a new test page and a new test template and copied the template file and called it "test.php". on this file i added on top $page = $pages->get("name=original") and on header and footer, where i had things like if($page->template == "original") i had to change them to if($page->template == "original" || $page->template == "test") All works fine, of course, but i was thinking that maybe all this could be made easier with a module. Would be nice if, for instance, the system would recognize a specific URL parameter (site/page/super-secret-test-parameter), and look for the file "test_template.php" instead of "template.php". I don't have any idea of how to make a module like this that's why I'm posting it here. Link to comment Share on other sites More sharing options...
Pete Posted April 13, 2012 Share Posted April 13, 2012 I think you would have to have your-url/?test=1 or something like that, otherwise if you add it to the end it will look for that URL as a page first, unless you turn on URL segments for every page too. I could be wrong though and it could be pretty simple as a module that runs before page render and intercepts the URL. Link to comment Share on other sites More sharing options...
diogo Posted April 13, 2012 Author Share Posted April 13, 2012 I think you would have to have your-url/?test=1 That's ok for me, the developer doesn't need pretty URLs Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now