Para::Frame::Site::File - Represents a file in the site
This class inherits from Para::Frame::File.
This is the superclass of Para::Frame::Site::Page.
Para::Frame::Site::File->new($req)
Creates a File object. It should be initiated before used. (Done by the methods here.)
Prefix url_ gives the path of the dir in http on the host
Prefix sys_ gives the path of the dir in the filesystem
No prefix gives the path of the dir relative the site root in url_path
path_tmpl gives the path and filename
path_base excludes the suffix of the filename
path gives the preffered URL for the file
For dirs: always exclude the trailing slash, except for path_slash
url_path_tmpl template url_base url_path template_url url_path_full sys_path sys_path_tmpl sys_base name #filename base #basename path_tmpl site_url base site_file path path_full path_slash
Returns the URI object, including the scheme, host and port.
The URL for the file in http on the host. For dirs, excluding trailing slash.
This is the PREFERRED URL for the file in http on the host. For dirs, including trailing slash.
The path and filename in http on the host. With the language part removed. For Para::Frame::Page this differs from /url_path.
The path to the template, including the filename, relative the site home, begining with a slash. But excluding the suffixes of the file along with the dots. For Dirs, excluding the trailing slash.
Same as /dir, except that if the template is the index, we will instead get the parent dir.
Gets the directory for the file. But parent for the page index.tt
or a Para::Frame::Site::Dir should be the parent dir.
Returns undef if we trying to get the parent of the Para::Frame::Site/home.
The URL path to the template, excluding the filename, relative the site home, begining but not ending with a slash. May be an empty string.
The template filename without the path.
For dirs, the dir name without the path.
The preffered URL for the file, relative the site home, begining with a slash. And for dirs, not ending with a slash.
The preffered URL for the file, relative the site home, begining with a slash. And for dirs, ending with a slash.
$f->site
Returns the Para::Frame::Site this page is located in.
$f->set_site( $site )
Sets the site to use for this request.
$site
should be the name of a registred Para::Frame::Site or a
site object.
The site must use the same host as the request.
The method works similarly to Para::Frame::Request/set_site
Returns: The site object