Custom Pages
You are able to create your own PHP and/or HTML/JS Pages to be loaded in the tab's module.
Setup
To achieve this, you need to create a page file named anything you want inside the pages
folder in the data
folder. The data
folder is located in the root folder of Organizr.
Once you have created a blank page, you may paste this skeleton code to get you started:
You need to change the first instance of
name_here
on theGLOBALS
variable.Also make the change on the function name.
They need to be the exact same words.
If you need DB Access, keep the if statement that has the
hasDB
method.If you need to check access by group, leave or change the first parameter in the
qualifyRequest
method to the cooresponding group IDMake the changes to the return with your code.
Accessing Tab
Once you have the code setup, you may access it via API or via Tab Editor.
API
This Endpoint will list all pages available
GET
https://organizr-url/api/v2/page
Displays the code of your custom page
GET
https://organizr-url/api/v2/page/name_here
Tab Editor
Create a new tab just like this
The Tab URL will be as follows: api/v2/page/name_here
where name_here
is the name of your new custom page.
After you have saved the tab, change the Tab Type to Organizr
and enable the tab.
Enjoy
That's it! Enjoy your new Custom Tab...
Last updated