Page 1 of 1

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

Posted: 2022-07-28 19:50
by howard
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.

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

Posted: 2022-07-28 20:17
by AhmedBR
Go to your HOOKS folder look inside these two files: links-home.php and links-navmenu.php

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

Posted: 2022-08-01 17:45
by howard
Can you show me an example code adding a reports button linking to a new page in hooks called reports.html ?

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

Posted: 2022-08-01 19:23
by AhmedBR
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.
		];