Routing is done in Boot. Take a look at the example application's Wiki
for an example of how to do it.
> Also, the wikki page for SiteMap doesn't seem to give an information
> on what it is for and how it should be used? Id be happy to start
> populating some of these pages and helping out with the Wikki in
> general but just need to get a better understanding of what things are
> *actually* for [versus what I might think there for ;)]
SiteMap is basically a whitelist of URLs that can be viewed in your
application along with the rules for who can view them.
The HelloLift example app has a blogging system in it with user authentication.
If you take a look at Entry.sitemap, it keeps track of it's own URLs
and who can view them. Some of behind authentication and some are
Hidden from the Menu builder.
HTH,
Steve
You can handle it in re-writing or set the Link.matchOnPrefix flag and
it'll match anything that begins with the link.
> Cheers
>
> Tim
>
> >
>
Tim Perrett wrote:
>
>
> However, the response:
>
> RewriteResponse( List("something", "foo"), Map("category" ->
> something) )
>
> gives an error.
Runtime? Compile-time? Stacktrace or error text please.
> When i look at the code for the unconference project
> it does something very similar without problem and was just wondering
> what was wrong with it? I have the following questions:
>
> - the :: something definition - this is just a variable placeholder
> for what will actually be in the url isnt it? Or does it *need* to be
> the same name as whats defined? (e.g. /fox/something ?)
>
This is all done with Scala's pattern matching.
"foo" :: something
-- and --
"foo" :: something :: _
-- and --
"foo" :: something :: Nil
Are different. In the first example, something is a List[String]
containing all the items after "foo" so "/foo" will match this pattern
and something will be Nil. "/foo/bar/baz" will also match and something
will be List("bar", "baz")
The second line matches "/foo/bar" where something = "bar" and
"/foo/bar/baz" where something is still "bar".
The third line matches "/foo/bar" where something = "bar" but will not
match "/foo" or "/foo/bar/baz"
You can read more about Pattern matching at
http://www.scala-lang.org/intro/patmatch.html and
http://www.scala-lang.org/intro/extractors.html
> - Is there a better way to control parameter passing rather than
> using _ ?
>
I don't understand the question.
> - In the response, RewriteResponse( List("something", "foo"),
> Map("category" -> something) ) isnt the Map the mapping of the request
> parameter into something that is bindable in the snippets?
>
This binds the contents of the something variable to a request parameter
that can be accessed via S.param or in the RequestState. This can be
accessed in a snippet with S.param("category") which will return a
Can[String]. The Can will be Full if the "category" parameter exists.
Thanks,
David