-
-
Notifications
You must be signed in to change notification settings - Fork 98
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
Tutorial 12, missing "No dice!" #64
Comments
Sorry for delay. I am not sure what the issue is? CLOG generally deals with all routing beyond routes static-files/ Is there something you are looking to accomplish? |
Thanks for the reply! What I want to accomplish is being able to route things in a way much like easy-routes, so that I could define a route like But I wasn't able to get my default handler to do its thing, so I looked to the tutorial. What the Apologies if I completely misunderstood what "default" is suppose to do since its documentation mentions using boot-file. |
Routing currently in CLOG is based on what path you associate with you handler is SET-ON-NEW-WINDOW. If you set :PATH to "" than that handler is called if there is no other path to a handler is set. It is possible in that handler (the default handler) to do your own routing by using the functions in clog-location.lisp to look at the url and then just call the handler function you want with the body parameter. |
For some reason I think I overlooked your issue, and didn't fully understand it or your issue. My deepest apologies. My focus for next release is on "website" development were previously it was on the GUI side predominantly. The current concept of a "default" route as in tutorial 12 is about a very different situation, and my documentation should have been more clear (fixing). It is the default in a case where a static html file includes the boot.js file but there is no route to specify which on-new-window-handler should handle on the lisp side that page, a far more limited situation. What you are looking for and now I am working on is a way to handle default URL paths, a far more common website situation. |
I have pushed some updates to tutorial 12 and other files with better documentation. I am still working on default url paths. |
I have added "extended-routing" on initializing clog, when enabled allows routes to be extended such that /page1 would also handle /page1/any/thing/you/want I may still in the future added something similar to easy-routes but the same thing is easily accomplished now by pattern matching on (path-name (location body)) in the handler. |
The default router never gets to say "No Dice!". On tutorial 12, when going to a route that is not
/tutorial/tut-11.html
nor any of the other handled paths like/page1
, it instead says "Not Found".The text was updated successfully, but these errors were encountered: