Jump to content


Photo

special testing pages


  • Please log in to reply
2 replies to this topic

#1 diogo

diogo

    Hero Member

  • Moderators
  • 2,068 posts
  • 1179

  • LocationPorto, Portugal

Posted 13 April 2012 - 05:11 AM

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.

#2 Pete

Pete

    Administrator

  • Administrators
  • 1,802 posts
  • 727

  • LocationChester, England

Posted 13 April 2012 - 06:46 AM

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.

#3 diogo

diogo

    Hero Member

  • Moderators
  • 2,068 posts
  • 1179

  • LocationPorto, Portugal

Posted 13 April 2012 - 06:48 AM

I think you would have to have your-url/?test=1


That's ok for me, the developer doesn't need pretty URLs




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users