Skip to content

Add items to navbar

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
<!-- file: hooks/header-extras.php -->
<script>
var navbar = AppGiniHelper.common.getNavbar();
var dropdown = navbar.addDropdown("Help", "question-sign", NavPosition.Right);
dropdown.addDivider("This application");
dropdown.addLink("General help", "#", "_help");
dropdown.addLink("drag & drop", "#", "_help");
dropdown.addDivider();
dropdown.addLink("Required permissions", "#", "_help");
dropdown.addLink("Help on workflow", "#", "_help");
dropdown.addDivider("Related apps");
dropdown.addLink("Help on PDF-File creation", "#", "_help");
dropdown.addDivider("Need help?");
dropdown.addLink("Support", "#", "_help");
// ...
<script>

1
2
3
4
5
6
7
8
<!-- file: hooks/header-extras.php -->
<script>
// ...
var navbar = AppGiniHelper.common.getNavbar();
navbar.addText("Click there &rarr;");
navbar.addLink("Link", "index.php", "flash");
// ...
<script>

1
2
3
4
5
6
7
<!-- file: hooks/header-extras.php -->
<script>
// ...
var navbar = AppGiniHelper.common.getNavbar();
navbar.addSearch("attachments_view.php", "search in pdf files");
// ...
</script>

ADD LINK

1
2
3
4
5
6
7
<!-- file: hooks/header-extras.php -->
<script>
// ...
dropdown.addLink("text", "href", "icon");
// optional 4th parameter: target (string), for example "_self", "_blank", "tab_name"
// ...
</script>

ADD BUTTON

1
2
3
4
5
6
<!-- file: hooks/header-extras.php -->
<script>
// ...
dropdown.addButton("text", function() { /* your code here*/ }, "icon");
// ...
</script>
ADD DIVIDER LINE
1
2
3
4
5
6
<!-- file: hooks/header-extras.php -->
<script>
// ...
dropdown.addDivider();
// ...
</script>

ADD DIVIDER WITH TEXT

1
2
3
4
5
6
<!-- file: hooks/header-extras.php -->
<script>
// ...
dropdown.addDivider("More");
// ...
</script>

Add custom search input field

1
2
3
4
5
6
<!-- file: hooks/header-extras.php -->
<script>
// ...
AppGiniHelper.common.getNavbar().addSearch("url", "placeholder", "value");
// ...
</script>

See also