If you're just looking for a way to programmatically set the title, getting
into LocParam might be a little bit of overkill. It's probably simpler to
set up your own SessionVars or RequestVars and access them from the Title
closure:

http://scala-tools.org/scaladocs/liftweb/1.0/net/liftweb/sitemap/Loc/Title.html

Derek

On Wed, Aug 5, 2009 at 9:45 AM, Naftoli Gugenheim <naftoli...@gmail.com>wrote:

>
>
> -------------------------------------
> Naftoli Gugenheim<naftoli...@gmail.com> wrote:
>
> So what I'm not clear on now is the input to Title. What is a LocParam, and
> how do you you use loc params? What is forceParam, defaultParams, param, and
> foundParam? And in any case how can Title know the value of the registered
> StatefulSnippet's newOrEdit state?
> Thanks!
>
> -------------------------------------
> David Pollak<feeder.of.the.be...@gmail.com> wrote:
>
> On Tue, Aug 4, 2009 at 12:47 PM, Naftoli Gugenheim <naftoli...@gmail.com
> >wrote:
>
> > Maybe my setup is atypical then :)
> > My default.html is does not have a title tag; instead each view has its
> > own, relying on head merge.
> > I don't know if originally I had it in default using lift:Menu.title or
> > not, but the difficulty with that would be that some pages can be used to
> > edit or add a new item, and the title needs to reflect that.
>
>
> Because the Title() case class takes a function, you can have it do all
> forms of stuff including looking to the current user, whether you're
> editing, and "do the right thing".
>
>
> >
> > So either (1) I need a way that the value of Menu.title will depend on
> data
> > in various StatefulSnippets; or (2) make the title ambiguous (add/edit
> > neutral); or (3) leave the titles in the views and process them with a
> > function somehow; or (4) put a snippet in the title of every view to get
> the
> > user.
> >
> >
> >
> > -------------------------------------
> > David Pollak<feeder.of.the.be...@gmail.com> wrote:
> >
> > On Sun, Aug 2, 2009 at 4:35 PM, Naftoli Gugenheim <naftoli...@gmail.com
> > >wrote:
> >
> > >
> > > How does the Title LocParam work?
> >
> >
> > The Title case class has a function that converts the current object
> > associated with the Loc into a String representing the title of the page
> > represented by the Loc.
> >
> >
> > >
> > > Is there a way to modify all titles to e.g. include the logged in
> user's
> > > name, without having to edit all the views?
> >
> >
> > The <title> tag is typically defined in the default template.  You could
> > include a snippet in the <title> tag that would contain the user's name.
>  I
> > would see this as separate from the title of the specific page referred
> to
> > by the Loc.Title.
> >
> >
> > >
> > >
> > > >
> > >
> >
> >
> > --
> > Lift, the simply functional web framework http://liftweb.net
> > Beginning Scala http://www.apress.com/book/view/1430219890
> > Follow me: http://twitter.com/dpp
> > Git some: http://github.com/dpp
> >
> > >
> >
>
>
> --
> Lift, the simply functional web framework http://liftweb.net
> Beginning Scala http://www.apress.com/book/view/1430219890
> Follow me: http://twitter.com/dpp
> Git some: http://github.com/dpp
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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