Using links-home.php to add an extra html page

Discussions related to customizing hooks. Hooks are documented at http://bigprof.com/appgini/help/advanced-topics/hooks/
Post Reply
howard
Veteran Member
Posts: 41
Joined: 2016-05-24 15:01

Using links-home.php to add an extra html page

Post by howard » 2022-07-28 19:50

Can someone post an example of how to add an extra link to the homepage navigation so I can add an html page?

The example text doesnt seem to work it makes my menu blank.

I put this text but doesn't seem to add it. I added the html file even to hooks folder and no dice.

'url' => 'Open Calls.HTML',
'title' => 'Open Calls',
'description' => 'Open Calls'

Thank you in advance.

AhmedBR
AppGini Super Hero
AppGini Super Hero
Posts: 327
Joined: 2013-09-19 10:23

Re: Using links-home.php to add an extra html page

Post by AhmedBR » 2022-07-28 20:17

Go to your HOOKS folder look inside these two files: links-home.php and links-navmenu.php
AppGini 22.14 - xampp 3.3.0 - PHP 7.4.30 - Summary reports - Calendar - Mass update - Messages - AppGiniHelper

howard
Veteran Member
Posts: 41
Joined: 2016-05-24 15:01

Re: Using links-home.php to add an extra html page

Post by howard » 2022-08-01 17:45

Can you show me an example code adding a reports button linking to a new page in hooks called reports.html ?

AhmedBR
AppGini Super Hero
AppGini Super Hero
Posts: 327
Joined: 2013-09-19 10:23

Re: Using links-home.php to add an extra html page

Post by AhmedBR » 2022-08-01 19:23

Just fill what is needed, very easy:

Code: Select all

<?php
	/*
	 * You can add custom links in the home page by appending them here ...
	 * The format for each link is:
		$homeLinks[] = [
			'url' => 'path/to/link', 
			'title' => 'Link title', 
			'description' => 'Link text',
			'groups' => ['group1', 'group2'], // groups allowed to see this link, use '*' if you want to show the link to all groups
			'grid_column_classes' => '', // optional CSS classes to apply to link block. See: https://getbootstrap.com/css/#grid
			'panel_classes' => '', // optional CSS classes to apply to panel. See: https://getbootstrap.com/components/#panels
			'link_classes' => '', // optional CSS classes to apply to link. See: https://getbootstrap.com/css/#buttons
			'icon' => 'path/to/icon', // optional icon to use with the link
			'table_group' => '' // optional name of the table group you wish to add the link to. If the table group name contains non-Latin characters, you should convert them to html entities.
		];
	 */
	 
	 		$homeLinks[] = [
			'url' => 'hooks/reports.html',  // <<<<<<<< this should be the exact link of your reports
			'title' => 'Reports', 
			'description' => 'Go to my reports',
			'groups' => ['Admins', 'group2'], // groups allowed to see this link, use '*' if you want to show the link to all groups
			'grid_column_classes' => '', // optional CSS classes to apply to link block. See: https://getbootstrap.com/css/#grid
			'panel_classes' => '', // optional CSS classes to apply to panel. See: https://getbootstrap.com/components/#panels
			'link_classes' => '', // optional CSS classes to apply to link. See: https://getbootstrap.com/css/#buttons
			'icon' => 'resources/table_icons/home.png', // optional icon to use with the link
			'table_group' => '' // optional name of the table group you wish to add the link to. If the table group name contains non-Latin characters, you should convert them to html entities.
		];
AppGini 22.14 - xampp 3.3.0 - PHP 7.4.30 - Summary reports - Calendar - Mass update - Messages - AppGiniHelper

Post Reply