| AddDefaultIndexToFolder |
| |
Add an index file to a folder |
| |
| Library |
 |
module::publisher/filemanager.whlib |
| |
| Syntax |
 |
PUBLIC RECORD FUNCTION AddDefaultIndexToFolder (INTEGER parentfolderid,INTEGER ownerid) |
| |
| Description |
 |
AddDefaultIndexToFolder() tries to add an index file to the folder with ID parentFolderID. If there already is an index available in the folder it will return the ID of this index file. If not, it will try to add an index to the folder using the standard rules: - Check if the site is configured to always use an index assigned to the folder If so, use it. If not then - check if there is an indexfile available in the parent folder. If so: copy this into our folder. If not, then - check if there is a default index file assigned to the site that should be used in no index can be copied from the parent folder. If so: use it. If not, there's nothing we can do. The index file that will be added must be an HTML (type: 5) or HareScript file (type: 7) |
| |
| Parameters |
 |
| parentFolderID |
 |
The ID of the folder in which to insert the index file. |
 |
| ownerID |
 |
The ID of the owner of the index file |
 |
|
| |
| Returns |
 |
A record containing the ID of new index file and an error message (if any) |
| |
The record contains the following cells:
| ID |
 |
The ID of new index file or 0 if we could find an index file to add, or if an error occurred |
 |
| errorcode |
 |
1: Site misconfigured |
 |
|
| |