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: 187
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 281 times

pböttcher
AppGini Super Hero
AppGini Super Hero
Posts: 1514
Joined: 2018-04-01 10:12

Re: Arranging custom links to save space on home page

Post by pböttcher » 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: 187
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
Veteran Member
Posts: 271
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
v 22.14 xampp 3.3.0 php 8.1.6 no more, back to php 7.4.29 - Summary reports - Calendar - Mass update - Messages - AppGiniHelper

rpierce
Veteran Member
Posts: 187
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
Veteran Member
Posts: 271
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.
v 22.14 xampp 3.3.0 php 8.1.6 no more, back to php 7.4.29 - Summary reports - Calendar - Mass update - Messages - AppGiniHelper

pböttcher
AppGini Super Hero
AppGini Super Hero
Posts: 1514
Joined: 2018-04-01 10:12

Re: Arranging custom links to save space on home page

Post by pböttcher » 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: 20
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: 20
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)

Post Reply