As of now i am routing like the following:
beego.Router("/detailed", &controllers.MainController{}, "get:Detailed")
Instead i want to route like this:
beego.Router("/detailed/[some-product-name]", &controllers.MainController{}, "get:Detailed")
i did try like below:
beego.Router("/detailed/:id", &controllers.MainController{}, "get:Detailed")
But all dependency files like js, bootstrap, css are expected in the path of /detailed/static/
instead of /static
.
Thank you.
It's not a beego problem. You probably made your include scripts, stylesheets link relative. In your html (template), all file "improts" you should predate with /
sign. So if you have
<script src="static/js/jquery.js" type="text/javascript"></script>
You need to change it to:
<script src="/static/js/jquery.js" type="text/javascript"></script>