On Thu, Jan 7, 2010 at 2:24 PM, Mads Hartmann <[email protected]> wrote:

> Hello
> Is it possible to add a Loc to the menu which would point to a file in
> webapp/allcategories.html but the url that would be visible to the
> user would be http://localhost:8080/categories/all
>
> I know i could do this using a rewrite rule like so:
>
> LiftRules.rewrite.append {
> case RewriteRequest( /* making it pretty */
>           ParsePath(List("categories"::"all"),_,_,_),_,_) =>
>           RewriteResponse("allcategories" :: Nil)
> }
>
> But i want the link created by Menu.builder to have the structure
> http://localhost:8080/categories/all
>
> I want to be able to have a folder structure that is independent of my
> url structure
>
> Currently the menu i'm talking about is constructed like so: Menu(Loc
> ("Alle_Kategorier", List("allcategories"), "Alle Kategorier"))
>

Menu(Loc("Alle_Kategorier", List("allcategories"), "Alle Kategorier",
Loc.Template(() => TemplateFinder.findAnyTemplate("foo" :: "bar" :: Nil)
openOr NodeSeq.Empty)))


>
> Heh I hope you can follow my train of though ;)
> Cheers
>
> --
> You received this message because you are subscribed to the Google Groups
> "Lift" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<liftweb%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/liftweb?hl=en.
>
>
>
>


-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics
--
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.

Reply via email to