I haven't looked at the CRUDify trait in a while, but I think that what you
want is something like:

    val entries =
      Menu(Loc("Home", List("index"), "Home")) ::
      Menu(Loc("Layous", Layouts.listPath, "Layouts", Layouts.menus: _*) ::
      User.sitemap

Using the listPath method makes sure that you match the actual prefix and
path. In your case, the class is "Layouts", which by default results in a
"Layouts" path prefix, but in your code you're using "layout". If you're
overriding the table name to "layout" then your code should be working, I
think. Also, List and Create are the only two links that should be shown,
but I'm not sure that the current CRUDify code makes the delete, edit and
view Menus hidden.

Derek


On Tue, Jun 23, 2009 at 10:42 AM, Nolan Darilek <no...@thewordnerd.info>wrote:

>
> This is something I asked in a subthread, but maybe it deserves its own
> thread in case someone might have the answer but chose to stop reading
> the original, whose subject line isn't really accurate for this question
> anyhow. :)
>
> I have a model that I'm using CRUDify for. I'd like to link the model
> into my sitemap such that it has a single top-level menu item pointing
> to /model/list, at which point the CRUD actions appear. So, basically, I
> want Model.menus to be a series of submenus beneath a menu named for the
> model. Thus far I have:
>
>     val entries =
>       Menu(Loc("Home", List("index"), "Home")) ::
>       Menu(Loc("layouts", List("layout", "list"), "Layouts"),
> Layout.menus:_*) ::
>       User.sitemap
>
> This gives me the Layouts menu item, but it doesn't work. Specifically,
> I get a 404 when I click on "Layouts", but not a message telling me that
> /layout/list isn't in the sitemap. From this I assume that /layout/list
> expects to find a filesystem-based template, and whatever magic the
> Layout.menus injects isn't taking.
>
> I've tried a number of variations. I'm also reading chapter 5 of
> Mastering Lift. It could be that the answer is there and obvious, but
> this is all a lot to take in for someone coming from five years of Rails
> and 1.5 of Merb. :)
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to