Comments (13)
navigationParentItem
already exists btw https://filamentphp.com/docs/3.x/panels/navigation#grouping-navigation-items-under-other-items
from filament.
All groups go after ungrouped items, we do not break up the ungrouped items with groups as it could result in weird behaviour where you expect part of the group to be in one place and another part to be in another
from filament.
Is there some way to archive this effect, or this this can be made behind a flag ?
Will you accept PR for something like this?
from filament.
No sorry, it would introduce too much complexity into the navigation logic.
from filament.
You can use navigation groups with blank labels to achieve a similar affect if you define the navigation()
function yourself
from filament.
Will try, thanks for the suggestions
from filament.
hi @danharrin
Can we have something like protected static ?array $acceptNavigationGroups = ['Two']
Parameter in the main menu acceptNavigationGroups
?
It will look like this
class One extends Page
{
protected static ?string $navigationIcon = 'heroicon-o-document-text';
protected static string $view = 'filament.pages.one';
protected static ?int $navigationSort = 1;
protected static ?array $acceptNavigationGroups = ['Two'];
}
class Two extends Page
{
protected static ?string $navigationIcon = 'heroicon-o-document-text';
protected static string $view = 'filament.pages.two';
protected static ?int $navigationSort = 2;
protected static ?string $navigationGroup = 'Two';
}
What do you think ?
from filament.
Or even better, an option is to research recursive menus with the KNP Menu builder, https://github.com/KnpLabs/KnpMenu
It allows unlimited nested menus.
from filament.
There is no technical reasons in PHP to not support nested menus. It's all frontend design work that is nearly impossible to balance and account for all combinations
from filament.
How to have a menu item appear inside another menu?
To make menu Two appear inside menu One, is not possbible at the moment
We can have new navigationParent
parameter to solve this issue.
For example:
protected static ?string $navigationParent = 'One';
The class would look like this:
class TwoOne extends Page
{
protected static ?int $navigationSort = 2;
protected static ?string $navigationParent = 'One';
}
class ThreeOne extends Page
{
protected static ?int $navigationSort = 3;
protected static ?string $navigationParent = 'One';
}
The problem is how to have a single menu item, then a dynamic menu inside the single menu, and then another single menu item.
Can you suggest solution ?
from filament.
I dont understand what that would do, sorry
from filament.
Hi, here is a picture of what im trying to make
Is this possible ?
from filament.
I suggest using clusters instead
from filament.
Related Issues (20)
- FileUpload doesn't upload in production HOT 1
- Select All Option should applied to only enabled options
- IntlException Constructor failed HOT 1
- `mutateRecordDataUsing` not mutating data when used with `ReplicateAction` HOT 1
- composer require beier/filament-pages:^2.1 HOT 2
- ExportAction in RelationManager
- Route [filament.lunar.resources.products.review] not defined. HOT 1
- Textarea in modal produces several JS errors
- Performance issue with table HOT 2
- FileUpload uncontrollably modifying the file path
- Bug with repeater state when using model eager loading by default
- Simple Repeater with FileUpload HOT 1
- Table Action Group Cannot Click 4th Action HOT 2
- FileUpload overlapping other elements HOT 2
- Remove table empty state Blade component
- `ExportAction` / `ImportAction` doesn't respect $modelLabel defined in Resource class
- Using `->path('/')` with Apache alias causes `Method Not Allowed` error with routes cached
- Modal Behavior Issue with Multiple Relations
- Problem with modals and QueryBuilder
- Checkbox state sharing issue in dynamically generated CheckboxList HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from filament.