-
Notifications
You must be signed in to change notification settings - Fork 40
Add primary links to the top navigation
Thomas Kuther edited this page Nov 3, 2018
·
7 revisions
You can add external links by configuring the links and adding a template override
The list of (extenal) links can be configured in local/config/config.inc.php (e.g. with LocalFiles Editor -> Custom configuration)
See https://github.com/Piwigo/Piwigo/blob/master/include/config_default.inc.php#L133 for documentation.
Example:
$conf['links'] = array(
'https://google.com' => 'Google',
'https://facebook.com' => 'Facebook',
);
mkdir template-extensions/bootstrap_darkroom
cp themes/bootstrap_darkroom/template/menubar_links.tpl template-extensions/bootstrap_darkroom/
Edit the newly created template-extensions/bootstrap_darkroom/menubar_links.tpl:
{foreach from=$block->data item=link}
<li class="nav-item">
<a href="{$link.URL}" class="nav-link"{if isset($link.new_window)} onclick="window.open(this.href, '{$link.new_window.NAME}','{$link.new_window.FEATURES}'); return false;"{/if}>{$link.LABEL}</a>
</li>
{/foreach}
Now, go to Administration -> Configuration -> Templates and select:
- adjusted template: bootstrap_darkroom/menubar_links.tpl
- original: menubar_links.tpl
- connected theme: bootstrap_darkroom
It's possible to create structures by insterting the html code in template-extensions/bootstrap_darkroom/menubar_links.tpl.
- Configure at least one link in
$conf['links']
as shown above, so the menu gets activated - Remove the
{foreach}..{/foreach}
loop code - Add your own (hardcoded) structure using bootstrap 4.x nav syntax
- Frequently Asked Questions
- Plugin Support Matrix
- Video support
- EXIF Metadata in PhotoSwipe
- Make it work like Smartpocket
- Add custom CSS and Javascript
- Override the Navbar style and background
- Compile your own Bootstrap
- Add primary links to the top navigation
- Add custom share buttons
- Hide image metadata by default
- Replace default mobile webapp logo icons
- Remove the "Mail to Webadmin" link in the footer
- Pre generate custom size derivatives