Helix Installation   Getting Started   Reference Documentation   Global Functions   Quick Start
Getting StartedHelpful ResourcesAsk questions on the Help ForumRead the User GuideBrowse the Reference DocumentationSubscribe to the Helix Mailing ListLearning HelixAdvanced Topics

Helix URL Structure

Requests made to a Helix site will be analyzed based on the structure of the URL.  If your site is running at http://www.example.com, then the Helix parser will determine what page to return based on the path given after the domain name.

For example, a request to http://www.example.com/hello-world (notice there is no ".php" on the URL) would tell the Helix parser to return the page called hello-world, which it should find at Helix/sites/mysite/interface/pages/hello-world/hello-world.php.

Images, Stylesheets, Javascript and Other Resources

You can access resources in your Helix application by simply naming the folder and filename of the resource.  For example, http://www.example.com/images/logo.gif would return the image located at Helix/sites/mysite/resources/images/logo.jpg.


If you wanted to show a page within the hello-world folder, then just point the URL to that folder.  For example, http://www.example.com/hello-world/how-are-you would return the page located at Helix/sites/mysite/interface/pages/hello-world/how-are-you/how-are-you.php.

Using this pattern, you can set up your site pages as many levels deep as you want.  This allows you to build a site with friendly page URLs that make sense to most users.  You can even use the URL to pass in data to your application without using the query string.

Friendly URL Params

Friendly URLs allow you to pass in data to your application without using the query string.  All you have to do is add text the URL path after you specify the page name.

Using the example above, you could pass in some extra data to the hello-world page by just adding some parameters after the page name, like:  http://www.example.com/hello-world/Monday/2009

In this case, your application would receive data in the global $params array available everywhere in your Helix application.  The $params array would look like:

// This shows the data that will be automatically 
    // available in the global $params array
$params[0] = "hello-world";
$params[1] = "Monday";
$params[2] = "2009";

The first value in the array is always the page name, and the rest of the values match exactly what is on the URL, broken up by forward slashes.

Get Helix PHP Framework at SourceForge.net. Fast, secure and Free Open Source software downloads