Skip to content

Commit 4cc2c58

Browse files
author
Gary Criblez
committed
You can use "#" to designate the 4D resources folder in your path
1 parent a938178 commit 4cc2c58

5 files changed

Lines changed: 18 additions & 4 deletions

File tree

Documentation/Methods/AJUI_Breadcrumb.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Exposes the Breadcrumb class at the host base. Replace New AJUI_BreadCrumb since
1111

1212
| Parameter | Type | In/Out | Description |
1313
| --------- | ---- | ------ | ----------- |
14-
| template | object | in | Properties :<br> - (text) templateName : Name of the folder containing the JSON file to import (template). If the file is not found, the method will return a new instance of AJUI BreadCrumb.<br> - (text) (optional) templatePath : You can specify a path to retrieve the file otherwise, the component will search in the default folder located in the resources (.../Resources/AJUI_BreadCrumb_Templates/). |
14+
| template | object | in | Properties :<br> - (text) templateName : Name of the folder containing the JSON file to import (template). If the file is not found, the method will return a new instance of AJUI BreadCrumb.<br> - (text) (optional) templatePath : You can specify a path to retrieve the file otherwise, the component will search in the default folder located in the resources (.../Resources/AJUI_BreadCrumb_Templates/). You can use "#" to designate the 4D resources folder in your path. |
1515
| instance | object | out | instance of AJUI_BreadCrumb with all the member functions |
1616

1717
## Example

Documentation/Methods/New AJUI_BreadCrumb.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This method returns an object variable (breadcrump) that represents an instance
1212

1313
| Parameter | Type | In/Out | Description |
1414
| --------- | ---- | ------ | ----------- |
15-
| template | object | in | Properties :<br> - (text) templateName : Name of the folder containing the JSON file to import (template). If the file is not found, the method will return a new instance of AJUI BreadCrumb.<br> - (text) (optional) templatePath : You can specify a path to retrieve the file otherwise, the component will search in the default folder located in the resources (.../Resources/AJUI_BreadCrumb_Templates/). |
15+
| template | object | in | Properties :<br> - (text) templateName : Name of the folder containing the JSON file to import (template). If the file is not found, the method will return a new instance of AJUI BreadCrumb.<br> - (text) (optional) templatePath : You can specify a path to retrieve the file otherwise, the component will search in the default folder located in the resources (.../Resources/AJUI_BreadCrumb_Templates/). You can use "#" to designate the 4D resources folder in your path. |
1616
| instance | object | out | instance of AJUI_BreadCrumb with all the member functions |
1717

1818
## Example

Project/Sources/Methods/AJUI_BC_info.4dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ End if
2020

2121
C_TEXT:C284($0)
2222

23-
$version_t:="1.2.2-Build38" // Fri, 26 Jun 2020 09:22:34 GMT
23+
$version_t:="1.2.3-Build39" // Wed, 29 Jul 2020 07:27:21 GMT
2424

2525
$0:="AJUI BreadCrumb (v18): "+$version_t

Project/Sources/Methods/AJUI_BC_loadTemplates.4dm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ $json_t:=""
2929

3030
If (Count parameters:C259=1)
3131
$folderTargetPath:=$1
32+
If ($folderTargetPath="#@")
33+
$folderTargetPath:=Replace string:C233($folderTargetPath;"#";Get 4D folder:C485(Current resources folder:K5:16;*))
34+
End if
3235
Else
3336
$folderTargetPath:=Get 4D folder:C485(Current resources folder:K5:16;*)+"AJUI_BreadCrumb_Templates"+Folder separator:K24:12
3437
End if

Project/Sources/Methods/AJUI_BC_templateImport.4dm

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,18 @@ If (Count parameters:C259=2)
4545
$pathName:=Get 4D folder:C485(Current resources folder:K5:16;*)+"AJUI_BreadCrumb_Templates"+Folder separator:K24:12+$fileName
4646
End if
4747
Else
48-
$pathName:=$2+$fileName
48+
If ($2="#@")
49+
$pathName:=Replace string:C233($2;"#";Get 4D folder:C485(Current resources folder:K5:16;*))
50+
Else
51+
$pathName:=$2
52+
End if
53+
54+
$folder:=Folder:C1567($pathName+$templateName+Folder separator:K24:12;fk platform path:K87:2)
55+
If ($folder.exists)
56+
$pathName:=$folder.platformPath+$fileName
57+
Else
58+
$pathName:=$pathName+$fileName
59+
End if
4960
End if
5061
Else
5162
$folder:=Folder:C1567(Get 4D folder:C485(Current resources folder:K5:16;*)+"AJUI_BreadCrumb_Templates"+Folder separator:K24:12+$templateName+Folder separator:K24:12;fk platform path:K87:2)

0 commit comments

Comments
 (0)