chrisbeluga / kirby-navigation Goto Github PK
View Code? Open in Web Editor NEWNavigation field for getkirby.com
Navigation field for getkirby.com
I prepared my menu locally with a different domain and ended up with non working links after deploying.
I tried to solve it in my template something like this: $navigation->id() ?? $navigation->url()
but for external links id() is an index number, so that's not working. (I guess one could test against the current host)
Is there a better way to work around that?
And how to handle multi lang menus? Building two?
Add functionality to add editable fields through blueprints
Hello,
first of all nice Plugin!
We are currently looking into using this plugin for a client-project. The only thing we would love to see changed or change ourselfs is the option to define a target for custom links.
CSS could be way neater, refactor this ASAP
Instead using this beforeCreate
hook https://github.com/chrisbeluga/kirby-navigation/blob/main/src/app.vue#L329
you should be able to achieve the same in your https://github.com/chrisbeluga/kirby-navigation/blob/main/src/index.js via
panel.plugin('beluga/navigation', {
fields: ...,
use: VueNestable
})
Nice PlugIn!
In view on Kirby 4, it could be interesting, to implement the new link field.
https://getkirby.com/releases/4.0/link-field
Can you add this:
<?php e($navigation->isOpen(), ' aria-current') ?>
Thank you.
It doesn't make sense for internal page links to have absolute url. Links working in local will be broken when you deploy prod.
Hi, I am using a docker container with an automated composer install on build, I am trying to avoid git cloning on my container to keep the image size at a minimum size (I have a very limited hosting space) so I'd like to install this package through composer like I did with other plugins, I tried the follow to no avail, and wondering if the package naming is actually correct.
bash-5.1# composer require chrisbeluga/kirby-navigation
In PackageDiscoveryTrait.php line 364:
Could not find a matching version of package chrisbeluga/kirby-navigation. Check the package spelling, your version constraint and that the package is available in a stability which matches your minimum-sta
bility (stable).
bash-5.1# composer require chrisbeluga/kirby-navigation@^3.0
In PackageDiscoveryTrait.php line 364:
Could not find a matching version of package chrisbeluga/kirby-navigation@^3.0. Check the package spelling, your version constraint and that the package is available in a stability which matches your minimu
m-stability (stable).
The readme on the repo doesn't have any instructions and I've seen in the closed issues someone mentioned for composer support since v1, but I am yet to figure out what is the package name.
Thanks!
Hello
How is it possible to display a submenu within a submenu?
I'm using the menu as below but I also need a submenu within the <ul class="menu vertical nested">
<div id="responsive-menu">
<div class="top-bar">
<ul class="dropdown vertical medium-horizontal menu" data-responsive-menu="drilldown medium-dropdown" data-auto-height="true" data-animate-height="true">
<?php foreach($site->mainnavigation()->toStructure() as $navigation): ?>
<li><a aria-label="<?php echo $navigation->text() ?>" href="<?php echo $navigation->url(); ?>"><?php echo $navigation->text() ?></a>
<?php if($navigation->children()->isNotEmpty()): ?>
<ul class="menu vertical nested">
<?php foreach($navigation->children()->toStructure() as $children): ?>
<li><a aria-label="<?php echo $children->text() ?>" href="<?php echo $children->url() ?>"><?php echo $children->text() ?></a></li>
<?php endforeach ?>
</ul>
<?php endif ?>
</li>
<?php endforeach ?>
</ul>
</div>
Thanks for your help
Hey,
thanks for the awesome plugin.
Is it possible to highlight the active menu item?
I use:
<?php foreach($site->navigation()->toStructure() as $navigation): ?>
<li>
<a <?php e($navigation->isOpen(), 'aria-current') ?> id="<?php echo $navigation->id() ?>" href="<?php echo $navigation->url(); ?>" <?php echo $navigation->popup()->toBool() ? 'rel="noopener noreferrer" target="_blank"' : '' ?>>
<?php echo $navigation->text() ?>
</a>
</li>
<?php endforeach ?>
and insert in the a-Tag this
<?php e($navigation->isOpen(), 'aria-current') ?>
Than all items are highlighted.
What am I doing wrong?
Thanks for your help!
I tried to add it in a section of a tab like this but got a message that navigation is not n available section type:
- width: 1/2
sections:
navigation:
label: Navigation
type: navigation
levels: 5
help: Description of menu or where it is used
I am using Kirby 3.6.0-beta.1 and kirby-navigation 2.0.0 via composer.
Is it possible to add a depth
key to the structure?
I'm able to use it in a template like this:
But if I use an external link, counting the slashes in an id doesn't work anymore.
When deleting top level menu items, sometimes it work, sometimes it doesn't. Needs investigation
I need to create navigation that depends from the site language. Now this plugin saves same data in all language versions. Could you please fix this?
Some labels/texts are hardcoded
Add delete confirmation when parent has children
Hi, I would like to create multiple different menus for a website I am building, would this be something that is possible with your plugin?
I normally have the main menu and footer menu for privacy and terms of use pages and then a sitemap menu which is a list of all pages on the website.
Hi,
do you plan to publish it as an composer package?
Would be awesome and much easier to install/update.
Thank your for your work.
This is a super helpful plugin.
The current implementation for the details modal has this footer right here with the remove button on the bottom right which is where kirby usually has the button to confirm the changes.
Since this is similar in spirit to the structure form I'd suggest you implement something more similar to the footer for the structure field entry so confirm button on the bottom right and a discard changes to the left. This is because muscle memory inside the panel makes it so that you immediately go in the bottom right to confirm the changes.
The delete action is already present in the dropdown menu so I don't think it is necessary to have it in the edit modal.
Change the way the modals work to one modal rather than two individual modals plus styling issues
Thank you for the great plugin, it already helped a lot with menu building and replaced my previous setup using structure fields nested inside structure fields ❤️
It might be on purpose that the label is not edible inline and expanded only by click in menu (three dots + edit).
But actually it is very cumbersome to edit multiple menu entries this way.
Please consider the following suggestions:
Also I wanted to note that the open and close icons are misleading in my opinion (looks like add and delete when considering the icon usage in other aspects of Kirby)
So I would suggest to use pencil
icon to edit/open + check
for closing or toggle the up
/ down
icons in the bar (like in most accordions)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.