webtop
webtop
webtop
Metadata
convertToStruct()
Converts a webtop XML file to a struct
Arguments
Name |
Type |
Required |
Default |
Options |
Description |
xml |
string |
Yes |
|
|
The XML to be converted |
defaultStruct()
Returns a struct containing the default attributes
Arguments
Name |
Type |
Required |
Default |
Options |
Description |
None |
getAttributeUrl()
Takes the webtop struct of a subsection, returns the string of a url to use for the sidebar.
Arguments
Name |
Type |
Required |
Default |
Options |
Description |
item |
any |
Yes |
|
|
The item being queried |
attr |
string |
No |
sidebar |
|
The attribute that contains the url |
params |
struct |
No |
[runtime expression] |
|
Parameters to add to the query string |
getItem()
Returns a translated webtop struct with all restricted items filtered out
Arguments
Name |
Type |
Required |
Default |
Options |
Description |
parent |
any |
No |
[runtime expression] |
|
The parent item to retrieve |
honoursecurity |
boolean |
No |
true |
|
Set to false to ignore security |
duplicated |
boolean |
No |
false |
|
Used to ensure the struct is only duplicated once |
init()
Initialise component with XML configs from core and custom admin.
Arguments
Name |
Type |
Required |
Default |
Options |
Description |
None |
loadWebtopFile()
Loads a webtop xml file and returns is
Arguments
Name |
Type |
Required |
Default |
Options |
Description |
file |
string |
Yes |
|
|
The file to load |
mergeWebtopStruct()
Merges two webtop structs together
Arguments
Name |
Type |
Required |
Default |
Options |
Description |
struct1 |
struct |
Yes |
|
|
The current struct |
struct2 |
struct |
Yes |
|
|
The struct to be merged |
translateWebtop()
Returns a translated version of the specified webtop struct
Arguments
Name |
Type |
Required |
Default |
Options |
Description |
webtop |
struct |
Yes |
|
|
The webtop struct to translate |
duplicated |
boolean |
No |
false |
|
Used to ensure a struct is only duplicated the first time |
updateDerivedAttributes()
Adds an rbkey attribute to each item
Arguments
Name |
Type |
Required |
Default |
Options |
Description |
item |
struct |
No |
[runtime expression] |
|
The webtop struct to update |
basekey |
string |
No |
webtop |
|
The base key to build the rest on |