Enables scripted content fragments to use Cfs
Methods
Get
Get Overload 1
Get a file
Velocity
#set($fileResponse = $core_v2_cfs.Get($fileStore, $filePath, $filename))
JavaScript
var fileResponse = core_v2_cfs.Get(fileStore, filePath, filename);
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| fileStore | String | Key of the file's store | Required | ||
| filePath | String | Path of the file within the store | Required | ||
| filename | String | Name of the file | Required |
Get Overload 2
Get a file
Velocity
#set($fileResponse = $core_v2_cfs.Get($fileStore, $filePath, $filename, "%{ Height = $heightArg, Width = $widthArg }"))JavaScript
var fileResponse = core_v2_cfs.Get(fileStore, filePath, filename, { Height: heightArg, Width: widthArg });Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| fileStore | String | Key of the file's store | Required | ||
| filePath | String | Path of the file within the store | Required | ||
| filename | String | Name of the file | Required | ||
| options | Options | Set of optional parameters including: | Required | ||
| Height | Number | When provided, constrains width of file by re-sizing and storing re-sized version | Optional | ||
| Width | Number | When provided, constrains height of file by re-sizing and storing re-sized version | Optional |
Returns
GetByUrl
Velocity
#set($fileResponse = $core_v2_cfs.GetByUrl($cfsUrl))
JavaScript
var fileResponse = core_v2_cfs.GetByUrl(cfsUrl);
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| cfsUrl | String | Cfs Url | Required |
Returns
ToString
Velocity
#set($stringResponse = $core_v2_cfs.ToString())
JavaScript
var stringResponse = core_v2_cfs.ToString();