Physical and Virtual Paths

AssetNow NX provides numerous paths allowing developers to easily link to assets and other resources whilst ensuring that paths will be independent of the install location.

You can review all available system parameters including virtual and physical paths using Tools > System > Dump > Application. This will display a dump of the ColdFusion application scope. The virtual and physical paths are available in the application.virtualPaths and application.physicalPaths structures.

To use a path reference the path parameter, for example application.virtualPaths.ANROOT is the site installation location.

Virtual Paths

These are the paths most commonly used by site designers to correctly access images, assets, style sheets, javascripts and the site root. Virtual paths parameters do not have a trailing slash (/). Following are the most common virtual paths used by designers and developers. The table assumes that AssetNow NX has been installed in a subdirectory named anx located below the the site root.

Parameter Example Description
ANROOT /anx Used to reference the install location, AssetNow processes all requests via the index.cfm template at this location. If AssetNow is installed in the server root folder this parameter is empty.
ASSETS /anx/ass Used to access the assets directory. Typically file based assets/resources are store in the assets directory.
DATA /anx/data Used for temporary data files. For example if you need to create a temporary xml file to feed data to a widget you can store it in this location.
JSCRIPTS /anx/js Used to access javascripts. You can organize scripts in subdirectories.
STYLES /anx/css Used to access style sheets.

Physical Paths

Physical paths are used by developers when they need to read/write files. The format of these paths depends on the operating system of the ColdFusion server. The following example is for a Microsoft Windows server, Linux based servers use Unix style paths. Physical paths always end in a path delimiter (/ for Windows, \ for Linux). The physical paths corresponding to the above virtual paths with AssetNow NX installed in the anx directory below the server root, are listed below.

Parameter Example
ANROOT C:\Inetpub\wwwroot\anx\
ASSETS C:\Inetpub\wwwroot\anx\ass\
DATA C:\Inetpub\wwwroot\anx\data\
JSCRIPTS C:\Inetpub\wwwroot\anx\js\
STYLES C:\Inetpub\wwwroot\anx\css\
Location

http://www.assetnow.com/index.cfm/1,84,284,0,html

Copyright © Orbital Limited 2010

Learn More        Try It Now!        See Versions and Pricing