New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example of a menu/submenu #210
Comments
Hm, that would be a helpful to have in a sample app. I think there are many ways to do it...
Page:
Menu.html:
I think there's more ways and variations. Does this help? |
Mix between 1&3 looks like a solid solution... My issue wasn't "I don't know how to do it" - it's more of "it would help newcomers to have examples of it"; and just a general question on different ways on how to do it. :) thanks :) |
@egonelbre I agree that it's not very obvious how to do what you were asking; it requires that a new Revel user get familiar with Go's template package. Hopefully when we add support for other more common 3rd party templating engines it will be more obvious. I'm sure we'll also add some clear instructions in the manual (and ideally some tutorial videos, too!). Thanks for being part of the Revel community and contributing your feedback and ideas! |
One common problem that people will try to implement is a menu/submenu. Although it's not too hard, but maybe samples how to do it would be beneficial. I thought of two ways - define menu on the view, and pass the focused item as a parameter to the renderer; define a filter that attaches a menu information to the controller and use that to build the menu. Also is there some recommended way of doing it?
The text was updated successfully, but these errors were encountered: