Dear Community Forum,
thanks for a lot of helpful tips and tricks, what a rewarding place to be! A novice user myself, and so great to learn from other's experiences.
We would like to have the links as seen on the image here, also on the index page. How can I do this? I hope this has not been posted before, I could not find it when I looked.
Have a great week!
E
Nav bar, links
Nav bar, links
- Attachments
-
- table view
- itemphp.PNG (50.1 KiB) Viewed 7149 times
Re: Nav bar, links
Dear Else and Torulf,
you can change this default behaviour in incCommon.php. Find the function htmlUserBar(). There are the following lines:
You can change or remove the whole if { }-clause and only keep the echo NavMenus(); line.
Afterwards, the nav-menus will be visible on homepage, too.
Caution: On next generation with will be overwritten.
Hope your project is #1 in Norway now!
Best,
Jan
you can change this default behaviour in incCommon.php. Find the function htmlUserBar(). There are the following lines:
Code: Select all
<ul class="nav navbar-nav">
<?php if(!$home_page) { ?>
<?php echo NavMenus(); ?>
<?php } ?>
</ul>
Afterwards, the nav-menus will be visible on homepage, too.
Caution: On next generation with will be overwritten.
Hope your project is #1 in Norway now!
Best,
Jan
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 24.10 Revision 1579 + 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 24.10 Revision 1579 + all AppGini Helper tools
Re: Nav bar, links
Hi,
if you do not want to edit the created file from AppGini (which will be overwritten as Jan stated), add the following to the hooks/header-extras.php file
if you do not want to edit the created file from AppGini (which will be overwritten as Jan stated), add the following to the hooks/header-extras.php file
Code: Select all
<?php
$home_page = (basename($_SERVER['PHP_SELF'])=='index.php' ? true : false);
if ($home_page) {
?>
<script>
$j(function() {
var x = '<?php echo str_replace("\r\n",'',str_replace("\t",'',NavMenus()));?>';
$j('.nav.navbar-nav:first').append(x.replace(/\t/g,''));
})
</script>
<?php
}
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.
Re: Nav bar, links
Thanks guys, for the tip and for the immediate response! It worked a treat.
Jan, I wish I could tell you that we are #1 in Norway, but not quite there yet! But we will be
Thanks again, and have fun with your code.
E
Jan, I wish I could tell you that we are #1 in Norway, but not quite there yet! But we will be
Thanks again, and have fun with your code.
E
Re: Nav bar, links
Hi @pböttcher,
very good idea and a great tip, thank you very much!
One small thing is happening now: On login-page we now get an empty "Jump-to"-dropdown
I think next to checking if we are on index.php we should also check if signIn parameter is defined or not.
I hope you don't mind if I add a very little piece to your code:
Now the menu's should not be visible on login page...
... but should be visible on dashboard ...
Best,
Jan
very good idea and a great tip, thank you very much!
One small thing is happening now: On login-page we now get an empty "Jump-to"-dropdown
I think next to checking if we are on index.php we should also check if signIn parameter is defined or not.
I hope you don't mind if I add a very little piece to your code:
Code: Select all
<?php $is_homepage = (basename($_SERVER['PHP_SELF']) === 'index.php' && !isset($_REQUEST['signIn'])); if ($is_homepage) { ?>
<script>
$j(function() {
var x = '<?php echo str_replace("\r\n", '', str_replace("\t", '', NavMenus())); ?>';
$j('.nav.navbar-nav:first').append(x.replace(/\t/g, ''));
})
</script>
<?php } ?>
... but should be visible on dashboard ...
Best,
Jan
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 24.10 Revision 1579 + 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 24.10 Revision 1579 + all AppGini Helper tools
Re: Nav bar, links
true
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.
Re: Nav bar, links
and how do you clean the index page keeping only the navigation bar?
in header page?
tks
in header page?
tks