We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 34201
    • 2 Posts
    Hi Everyone,

    I’m trying to create a pluggin (On Modx Evo 1.0.4) that would set up a specific template when creating a new document with the $_GET[’template’]={templateid} is provided => index.php?a=4&pid=85&template={templateid} .
    The goal is to create custom links in the manager to quickly create specific pages.
    So far I’m trying to execute the following plugin on event OnDocFormRender :

    if (isset($_REQUEST['template'])) {
      $Template=$_REQUEST['template'];
      if (is_numeric($Template)) {
        $modx->documentObject['template']=$Template;
    }
    }


    So far it’s not working. The link index.php?a=4&pid=85&template={templateid} is located in the manager’s Welcome Page. Is the problem I’m facing due to the manager’s iFrame ?

    Thanks in advance for all your enlightments smiley

    Florian