Hello,
I need to add three (3) URLs in the Array in links-home.php :
../budget/Projects_2020.php
../budget/Projects_2021.php
../budget/Projects_2022.php
I am able to add a single link, but I don't How to add the other links!
I have tried to add the 2nd like for instance like this but it did not work:
'url' => '../budget/Projects_2020.php', '../budget/Projects_2021.php',
How to add more than one link to the Array ?
links-home.php
$homeLinks[] = array(
'url' => '../budget/Projects_2020.php',
'title' => 'Project of 2020',
'groups' => array('Users'),
);
How to add more than one link to the Array in links-home.php?
How to add more than one link to the Array in links-home.php?
THANK YOU...
AppGini Pro 24.11 -
Calendar - Search Page Maker - Summary Reports - Mass Update - DataTalk -
bizzworxx AppGini Helper JabaScript Library - bizzworxx Inline Detail-View - bizzworxx Helper Pack - AppGini Helper Packaging Tool -
Udemy course
AppGini Pro 24.11 -
Calendar - Search Page Maker - Summary Reports - Mass Update - DataTalk -
bizzworxx AppGini Helper JabaScript Library - bizzworxx Inline Detail-View - bizzworxx Helper Pack - AppGini Helper Packaging Tool -
Udemy course
Re: How to add more than one link to the Array in links-home.php?
Code: Select all
// file: hooks/links-home.php
// #1
$homeLinks[] = array(
'url' => '../budget/Projects_2020.php',
'title' => 'Project of 2020',
'groups' => array('Users'),
);
// #2
$homeLinks[] = array(
'url' => '../budget/Projects_2021.php',
'title' => 'Project of 2021',
'groups' => array('Users'),
);
// ... repeat for every new home-link
$homeLinks[] = array(
'url' => '../budget/Projects_yyyy.php',
'title' => 'Project of yyyy',
'groups' => array('Users'),
);
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 25.10 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 25.10 + all AppGini Helper tools
Re: How to add more than one link to the Array in links-home.php?
If you have named all custom pages after the same pattern:
Code: Select all
$min = 2020;
$max = 2022;
for ($y = $min; $y <= $max; $y++) {
$homeLinks[] = array(
'url' => "../budget/Projects_{$y}.php",
'title' => 'Project of {$y}',
'groups' => array('Users'),
// more settings
);
} // end for
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 25.10 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 25.10 + all AppGini Helper tools
Re: How to add more than one link to the Array in links-home.php?
Instead of writing one script per year, you could also use the same script and pass the year as parameter:
In your report-script, fetch the year from URL:
Code: Select all
$min = 2020; // from starting year 2020...
$max = date("Y"); // until current year (including)
for ($y = $min; $y <= $max; $y++) {
$homeLinks[] = array(
'url' => "../budget/Projects_report.php?y={$y}",
'title' => 'Projects of {$y}',
'groups' => array('Users'),
// more settings
);
} // end for
Code: Select all
$y = isset($_REQUEST['y']) ? makeSafe($_REQUEST['y']) : date('Y');
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 25.10 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 25.10 + all AppGini Helper tools
Re: How to add more than one link to the Array in links-home.php?
Hello jsetzer,
Simply, you are a lifesaver
and
many thanks for your generosity in sharing the code.
Have a nice day
Simply, you are a lifesaver

and
many thanks for your generosity in sharing the code.
Have a nice day
THANK YOU...
AppGini Pro 24.11 -
Calendar - Search Page Maker - Summary Reports - Mass Update - DataTalk -
bizzworxx AppGini Helper JabaScript Library - bizzworxx Inline Detail-View - bizzworxx Helper Pack - AppGini Helper Packaging Tool -
Udemy course
AppGini Pro 24.11 -
Calendar - Search Page Maker - Summary Reports - Mass Update - DataTalk -
bizzworxx AppGini Helper JabaScript Library - bizzworxx Inline Detail-View - bizzworxx Helper Pack - AppGini Helper Packaging Tool -
Udemy course