Comments (5)
Hello VickG,
I am not entirely sure what you mean by "menu node that is using a route
that takes an ID" and "Depending on the user the ID will be different".
What would this menu look like? Can you give me a use case to help picture
it?
Would you have a parent menu node called "Users Favorite Movies" and under
list a few menu entries to a movie?
Some things like this:
Menu | Route |
---|---|
Users Favorite Movies | users/{userID}/fav_movies |
\ Star Trek | users/{userID}/fav_movies/{movieID} |
+ Star Wars | users/{userID}/fav_movies/{movieID} |
Is a menu like that what you have in mind?
Do you have an idea about how would you build such a variable menu in the
first place?
/s
On Wed, Jul 13, 2016 at 8:09 PM, VickG [email protected] wrote:
In my case, I want to have a menu node that is using a route that takes an
ID.e.g.
movies/44/editIs there currently a way to manage this? Depending on the logged in user,
the ID will be different. Or else I would have used the "URL" field of the
menu item.—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#46,
or mute the thread
https://github.com/notifications/unsubscribe/AC30Ft8tavbLBxlZ-77SMx-pOBONUSq8ks5qVX5VgaJpZM4JL-Ah
.
from laravel-enterprise-starter-kit.
Yes that is exactly what I have in mind as you mentioned.
How do I create a menu-element using your menu system that uses a route like:
users/{userID}/fav_movies
I picked the correct route from the Routes dropdown and I put this in the "URL" field
users/{id}/fav_movies
but no luck..
Any advice?
On Jul 13, 2016, at 7:47 PM, Sebastien Routier [email protected] wrote:
Hello VickG,
I am not entirely sure what you mean by "menu node that is using a route
that takes an ID" and "Depending on the user the ID will be different".What would this menu look like? Can you give me a use case to help picture
it?Would you have a parent menu node called "Users Favorite Movies" and under
list a few menu entries to a movie?
Some things like this:
Menu Route Users Favorite Movies users/{userID}/fav_movies \ Star Trek users/{userID}/fav_movies/{movieID} + Star Wars users/{userID}/fav_movies/{movieID} Is a menu like that what you have in mind?
Do you have an idea about how would you build such a variable menu in the
first place?/s
On Wed, Jul 13, 2016 at 8:09 PM, VickG [email protected] wrote:
In my case, I want to have a menu node that is using a route that takes an
ID.e.g.
movies/44/editIs there currently a way to manage this? Depending on the logged in user,
the ID will be different. Or else I would have used the "URL" field of the
menu item.—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#46,
or mute the thread
https://github.com/notifications/unsubscribe/AC30Ft8tavbLBxlZ-77SMx-pOBONUSq8ks5qVX5VgaJpZM4JL-Ah
.—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
from laravel-enterprise-starter-kit.
I will take it that this is not currently supported?
from laravel-enterprise-starter-kit.
Sorry, busy week-end and I did not get a chance to reply to your question.
The issue is that when the URL is resolved to create the HTML menu entry, all variables ({userID} in your case) must be known to the rendering function in the MenuHandler.
I think that you have 2 options:
- Build a menu to your own controller with the URL/Route "users/fav_movies" that will resolve all required variables and either:
A. Directly render the favorite movies view for the desired user or
B. Redirect to the route that you want (i.e. "users/{userID}/fav_movies"). - Create your own MenuHandler that knows what variables will be needed, resolves them and replace them in the route URL before rendering the menu entry. Look at the "generateUrl()" function of the MenuHandler that you are currently using for example the "L51ESKSecuredMenuHandler" first tries to get the URL from the route if configured if that fails it gets it from the URL, right before the function returns if where I would replace any variable in the URL with resolved values.
Hope that helps a little. Let me know what you think.
/s
from laravel-enterprise-starter-kit.
ok, thank you.. I will close this.
from laravel-enterprise-starter-kit.
Related Issues (20)
- Branch L55 created HOT 3
- Ldap error HOT 1
- Exception retrieving user information: Array to String Conversion HOT 4
- Error when Running php artisan make:module:model HOT 1
- New user role assign HOT 8
- JavaScript in Modals HOT 5
- Upgrade to newest laravel version HOT 2
- Rapyd View HOT 1
- Domain expired
- error when run : php artisan ide-helper:models HOT 1
- Lesk with Laravel 5.3 HOT 2
- The flash object HOT 2
- Default domain for username registration HOT 4
- Default domain for username registration HOT 3
- Skins and Layout HOT 1
- AD ERROR: Exception retrieving user information: Array to string conversion HOT 2
- is there any way to disable the requirement for LDAP when installing ? HOT 1
- Document Management System HOT 5
- Date Format in FORM::Date HOT 4
- Upgrade to laravel v5.4 HOT 5
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 laravel-enterprise-starter-kit.