Helma logo
helma.org » Home > docs > reference > Path Object

Path Object

Accessing objects in the URI path.

Syntax
path[prototypeNameString]
path.prototypeName

The objects in the URI request path are accessible as array members of the global path object as well as named properties of path via their prototype name.

When Helma receives an HTTP request e.g. from a browser, it maps the URI path of the URL to HopObjects. This way, the path is interpreted as an hierarchy of HopObjects.

For instance, if an object in the URI path has a prototype called "story", it will be accessible as path["story"] or path.story.

An example for an URI path and its matching HopObjects:

/weblog/myWeblog/20010817/304/
| app  | weblog | story  | comment
Example An example request path of an application:
/h_files/myDocument/storyTitle/23

for (var i=0; i<path.length; i++)
   res.writeln(path[i]);

HopObject file
HopObject document
HopObject story
HopObject note


var obj = path.story;
res.write(obj);

HopObject story


Up: Reference
Previous: Remote Object Next: Skin Object

... comment


Page last modified on 2002-09-16 16:48 by hns

 
tobi, Tuesday, 18. January 2005, 17:36
path.contains(HopObject)

... link  

 
laessig, Monday, 22. May 2006, 15:44
path.href()
path.href() gets the present URL path as a string

... link  


... comment