EDITOR
This section describes the Code Editor of the interface and the CSS style editor. Only templates that are not in use can be modified to avoid display problems.
CODE EDITOR
Code editor on the platform. Code Editor allows to edit the templates, previously loaded on the platform in an easy and fast way, allowing the customization needed.
Main View of Code Editor
In this view is the visualization and customization of the source code of the templates in the system.
Two possible selections are possible:
Available templates: it shows the themes available in the system
Template files: Files to edit from the selected theme.
In the main OpenAccess template the options are:
403.php:
Template to indicate that the server refuses to allow the requested action.
Note: In this view the search_advanced function is used and this is how the function works.
404.php:
Template to indicate that the resource does not exist.
Note: In this view the search_advanced function is used and this is how the function works.
footer.php: Template to indicate the footer and calls to javascript.
header.php: Template to indicate the header where calls to CSS files are located and where the navigation menu will be displayed.
menu.php:
Template where the OpenAccess dynamic menu code is located.
In this view the following variables could be used:
$items_menu: The menu items brought from the database serve to render the menu view in the header. It returns an array with all the menu items and this will have an array with all the necessary data.
Key | Description | Type |
parent | Unique identifier of the parent element | Numeric |
label | Name of the element | String |
class | The CSS classes of the menu | String |
link | The route in which the user who presses the menu will be redirected | String |
id | Unique identifier of the menu | Numeric |
target | In case it is _ (blank) the page will open in a new tab | String |
$languages: This variable manages all the languages, that are active in the database, to add them to the menu. It returns an array with all the active languages in these arrays, and the object has the following values
Key | Description | Type |
id | Unique language identifier | Numeric |
name | Language name | String |
direction | LTR (Left-to-Right) or RTL (Right-to-Left) reading orientation | String |
active | State in which it is located: language 1 for activated and 0 for not activated | Boolean |
icon | Icon in case of having it for HTML | String |
iso | acronym that represents a language | String |
searcher.php: Main view template of the home.
searcher_advanced.php: Advanced and basic search engine template.
In this view the following variables are present:
$metadata_descriptors: This variable will have all available metadata descriptors that will be shown in the select.
Key | Description | Type |
name | Name of the descriptor | String |
iecode | unique code of the descriptor | String |
Pages/: In this folder are located all the templates of the visualization pages.
browse/: In this folder the templates of the search results are located, such as list, time, map, picture in addition to the folder of the facets templates.
In this folder all views will have the following variables:
1. $results_flat: This variable contains the search results. It returns an array with all the records and within this record there will be an array with all the values.
Key | Description | Type |
schema | Unique identifier of the schema to which the record belongs | Numeric |
Identifier | Unique identifier of the preserved files | String |
keywords | Array with all keywords of the record | Array |
title | Record name | String |
description | Record description | String |
storage | Unique identifier of the record content storage | Numeric |
published | To be shown or not in the front 1 for activated and 0 for deactivated | Boolean |
2. $metadata_descriptors: Contains all available metadata descriptors. It returns an object with all the descriptors associated with the record and within this object it will have two values.
Key | Description | Type |
name | Name of the descriptor | String |
iecode | unique code of the descriptor | String |
3. $pagination: Rendering of the pagination.
Returns the HTML of the pagination.
4. $pagination_data: Pagination information. It returns an array with the following values.
Key | Description | Type |
page | the page on which the user is located | Numeric |
limit | Number of maximum returned items | Numeric |
total | total records found | Numeric |
sort | numeric array with all active sort elements | Array |
5. $iso: Here the ISO of the active language is stored. It returns a string with the ISO of the active language.
Variable | Description | Type |
iso | acronym that represents a language | String |
6. $direction: Right-to-left (RTL) or left-to-right (LTR) direction of the current text. It returns a string with text orientation.
Variable | Description | Type |
direction | text orientation | String |
7. $facets: It contains all active facets. It returns an array of all active facets and within the facet there is an array with the values.
Key | Description | Type |
key | Element value | String |
doc_count | Number of elements | Numeric |
8. $sortby: This variable contains the type of sort currently in use. It returns a String with the value of the sort.
Variable | Description | Type |
sortby | Value of the sort | String |
9. $sort: this variable has all the arrangements for the view. It returns an array with all the sorts available for the view.
Key | Description | Type |
param | Parameter used to sort | String |
label | Sort Name | String |
dir | ascending or descending | String |
10. $types: this variable has the available typologies. It returns an array with all the available typologies.
Key | Description | Type |
id | Unique identifier of the type | Numeric |
name | Name of the type | String |
description | Description of the type | String |
slug | fragment of the name of the type | String |
type | Type of content it handles | String |
enabled | 1 for enabled and 0 for disabled | Boolean |
viewer_id | Unique identifier of the viewer | Numeric |
Facets/: This folder contains the facet templates.
__wrapper.php: Main template where search results will be displayed.
__wrapper_index.php: An index template that calls the wrapper template or any template to use.
__wrapper_map.php: A map template that calls the wrapper template or any template to use.
__wrapper_time.php: A time template that calls the wrapper template or any template to use.
__wrapper_picture.php: A picture template that calls the wrapper template or any template to use.
Category/: Folder for category templates.
item.php:
Template to display the showcase and subcollections of a collection.
This view has the following variables:
1. $categories: all the child categories of the selected category. It returns an array with all the categories.
Key | Description | Type |
id | Unique identifier of the category | Numeric |
name | Name of the category | String |
path | Route of the category | String |
parent_id | Unique identifier of the parent of the category | Numeric |
description | Category description | String |
hidden_home | 1 to hide it in the home and 0 to not hide it | Boolean |
hidden | 1 to hide it and 0 to not hide it | Boolean |
html | HTML code to show in the view | String |
html_position | contain the position where the HTML will be shown | String |
featured | 1 to indicate that it is a feature and with 0 for the opposite case | Boolean |
order | value will be the position in which it is shown according to the other categories | Numeric |
storage_id | unique identifier of the storage to be used | Numeric |
total | total of records associated with this category | Numeric |
2. $parentCategory: Information of the selected category. It returns an object.
Key | Description | Type |
id | Unique identifier of the category | Numeric |
name | Category name | String |
path | category path | String |
parent_id | Unique identifier of the category parent | Numeric |
description | Category description | String |
hidden_home | 1 to hide it in the home and 0 to show it | Boolean |
hidden | 1 to hide it completely in the front and 0 to show it | Boolean |
html | HTML code of the category | String |
Home/: Home templates
empty.php:
Empty template for pages’ controller.
This view has the following variables:
$html: It contains the entire HTML code of the page.
$meta_title: Page metadata title.
$meta_description: Metadata description of the page.
index.php:
Main template of the entire interface.
This view has the following variables:
1. $featureds: the featured records: Array with the key values, this key will contain an array of all feature records.
Key | Description | Type |
id | unique record identifier | Numeric |
schema | Unique identifier of the schema to which the record belongs | Numeric |
identifier | unique identifier within the OpenAccess | String |
keywords | Keywords associated with the record | String |
name | Record name | String |
description | Record description | String |
2. $tags: It contains 5 tags brought randomly. Array of objects.
Key | Description | Type |
value | The tag name | String |
3. $categories: It contains all the parent categories that are available to display at home. Array of objects.
Key | Description | Type |
id | Unique identifier of the category | Numeric |
name | Category name | String |
path | Category path | String |
parent_id | unique identifier of the parent category | Numeric |
description | description of the category | String |
hidden_home | 1 to not show it in the home and 0 to show it | Boolean |
hidden | 0 to show it and 1 to not show it in the entire front | Boolean |
html | HTML code of the category | String |
4. $searcher: It contains the rendered search engine.
Login/: this folder has everything related to user login.
index.php: User login template.
view/: this folder has the templates of the view controller.
__wrapper.php:
Main record View Template
This view has the following variables:
1. $object: All information of the object.
Key | Description | Type |
object_type_viewer_id | Unique identifier of the schema to which the record belongs | Numeric |
id | Unique identifier of the record. | String |
keywords | Array with all keywords of the record | Array |
title | Record name | String |
description | Record description | String |
storage | Unique identifier of the record content storage | Numeric |
published | To be shown or not in the front: 1 for activated and 0 for deactivated | Boolean |
2. $topnavigation: The variable contains the path of the next and previous object(s).
Key | Description | Type |
prev | Route of the previous record. | Numeric |
back | Route of the previous view visited. | Numeric |
next | Route of the next record. | Numeric |
3. $pagination_data: Pagination information.
Key | Description | Type |
page | the page on which the user is located | Numeric |
limit | Number of maximum returned items | Numeric |
total | total records found | Numeric |
sort | numeric array with all active sort elements | Array |
4. $related: Objects related to the selected object.
Key | Description | Type |
related_object_id | Unique identifier of the related object to which the record belongs | Numeric |
5. $attachments: array of stored files of the object.
6. $location: array with all the location data of a record.
wayback/: this folder has everything related to the wayback view.
index.php: Main wayback view template.
Viewers/: this folder contains all the templates of the viewers.
Last updated