You are not logged in.
Pages: 1
When building templates, it's a good idea to let BigTree generate your links. Because administrators have the ability to modify page URLs, avoiding hard-coded links keeps your site working properly.
To always link to a specific page, use $cms->getLink(), passing in the id if the page you're linking to. $cms->getLink() provides the full page URL, including http:// and a trailing slash. Read more about getLink().
$www_root always links to your homepage, including http:// and a trailing slash. Use $www_root when linking to static assets like stylesheets, javascript files, and uploads.
Finally, the "link" value returned by $cms->getNavByParent() contains a full URL for the related page. Read more about getNavByParent().
Offline
Utilizing $www_root and $cms->getLink(), as opposed to hard coding links, also makes launching a site super simple. When moving from your development environment to your live server, simply update 3 lines in the config.php file to the new location of the site and BigTree will take care of updating all internal site links automatically:
// Simply Change:
$config["domain"] = "http://dev.example.com";
$config["www_root"] = "http://dev.example.com/";
$config["admin_root"] = "http://dev.example.com/admin/";
// To:
$config["domain"] = "http://www.example.com";
$config["www_root"] = "http://www.example.com/";
$config["admin_root"] = "http://www.example.com/admin/";
Offline
Remember that the $config variable has be deprecated. Please use $bigtree["config"] instead.
Offline
Pages: 1