Arranging custom links to save space on home page

Discussions related to customizing hooks. Hooks are documented at http://bigprof.com/appgini/help/advanced-topics/hooks/
Post Reply
rpierce
Veteran Member
Posts: 255
Joined: 2018-11-26 13:55
Location: Washington State

Arranging custom links to save space on home page

Post by rpierce » 2022-07-22 17:34

Is there a way to rearrange home links so that custom links appear in the same row on the home page as table links?? If you look at the image you see the large blank space created in the link section. I want to eliminate this. The "Open Audits" link is to a PHP page, not an AppGini table. It would be nice to see it on the same row as the link above it.

Thanks, Ray
Capture.JPG
Capture.JPG (29.64 KiB) Viewed 1948 times

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: Arranging custom links to save space on home page

Post by pbottcher » 2022-07-23 09:55

Hi,

you can try this in your hooks/footer-extras.php

Code: Select all

<script>
$j(function() {
	$j('.custom_links').prev().last().append($j('.custom_links div:first'));
	$j('.panel-body-description').css('height','auto')	
})
</script>
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

rpierce
Veteran Member
Posts: 255
Joined: 2018-11-26 13:55
Location: Washington State

Re: Arranging custom links to save space on home page

Post by rpierce » 2022-07-28 23:16

That didn't do it Pascal.

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

Re: Arranging custom links to save space on home page

Post by AhmedBR » 2022-07-28 23:24

try this instead (a small variation), by the way thanks to pböttcher :D

Code: Select all

<script>
$j(function() {
$j('.custom_links').prev().first().append($j('.custom_links div:first'));
})
</script>
Take a look at this link, might help:
viewtopic.php?f=4&t=4837
AppGini 22.14 - xampp 3.3.0 - PHP 7.4.30 - Summary reports - Calendar - Mass update - Messages - AppGiniHelper

rpierce
Veteran Member
Posts: 255
Joined: 2018-11-26 13:55
Location: Washington State

Re: Arranging custom links to save space on home page

Post by rpierce » 2022-07-29 20:43

Well, when I use that variation the link in question goes into the first Table Group, ignoring the setting in the links-home.php file. Do I need to create the fake table as you talk about in the link you provided also?

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

Re: Arranging custom links to save space on home page

Post by AhmedBR » 2022-07-29 21:32

The easiest way to get full control is creating fake table that act as redirection, since it is automated via Appgini, no coding is required.
This is what I personally use.
AppGini 22.14 - xampp 3.3.0 - PHP 7.4.30 - Summary reports - Calendar - Mass update - Messages - AppGiniHelper

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: Arranging custom links to save space on home page

Post by pbottcher » 2022-07-30 08:06

Hi,

thanks for testing. As you may have multiple table-groups you can try

Code: Select all

<script>
$j(function() {
	$j('.custom_links').prev().each(function() {
		$j(this).append($j(this).next().find('div:first'))
	})
	$j('.panel-body-description').css('height','auto')		
})
</script>
This shall append your custom entry to the end of existing tablelist within your table-group.

If you want to add your custom entry to the beginning try

Code: Select all

<script>
$j(function() {
	$j('.custom_links').prev().each(function() {
		$j(this).prepend($j(this).next().find('div:first'))
	})
	$j('.panel-body-description').css('height','auto')		
})
</script>
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

mcvaidas
Posts: 26
Joined: 2019-04-14 17:45

Re: Arranging custom links to save space on home page

Post by mcvaidas » 2022-08-02 18:21

Hi, script is working just everything (custom-links) disappears in mobilemenu (vertical)

mcvaidas
Posts: 26
Joined: 2019-04-14 17:45

Re: Arranging custom links to save space on home page

Post by mcvaidas » 2022-08-06 11:48

append is ok, just prepend disappears in mobilemenu
mcvaidas wrote:
2022-08-02 18:21
Hi, script is working just everything (custom-links) disappears in mobilemenu (vertical)

fdissait
Posts: 23
Joined: 2019-07-24 07:57

Re: Arranging custom links to save space on home page

Post by fdissait » 2022-08-17 12:47

Yes, it works, but only once, if you have two custom links, one is on the first row (that of table f.i.), but the second is on the second row, even is the is place on the first row ....

Post Reply