• I needed to have dynamic URLs created once a user (say Organization) submitted a registration form where the URL would be domain.com/organizations/organization-name/dashboard/

    The “organization-name” is part of the registration form that gets checked by Ajax for duplication. (this is already accomplished )

    The problem I have is that the URL is getting created in root not within the theme. So I’m getting a blank screen.

    My question is, how can I extend my current theme to these dynamic URLs that get created. How do I place my current theme’s header/footer within this code:

    function arfGenURL($orgName)
    {
    date_default_timezone_set('America/New_York');
    $dir = "organizations/" . $orgName . "/dashboard/";
    echo var_dump(mkdir($dir,0777,TRUE));
    $content = "<html><head><title>Organization Dashboard |</title></head><body></body></html>";
    $fp = fopen($_SERVER['DOCUMENT_ROOT'] . '/' . $dir . "/index.php","wb");
    fwrite($fp,$content);
    fclose($fp);
    print_r(error_get_last());
    }

    in the code above, what can I put in $content that pull header and footer of active theme? …any ideas folks?

    Thank you!

  • The topic ‘Need theme's header and footer in dynamic URL’ is closed to new replies.