Jorge Ortiz wrote:
> Also nice would be ways to programmatically access template features,
> e.g. embed("template") or snippet("Class:method"), etc
>   
Some of these are available on LiftSession, but it might be cool to add 
this stuff to S to make it easer to call... wanna add that code?

> --j
>
> On Thu, Sep 11, 2008 at 2:55 PM, Jorge Ortiz <[EMAIL PROTECTED]> wrote:
>   
>> There's some parallels between Lift's templates and lazy evaluation.
>> In the examples below, the code inside the snippets is "lazy", it
>> doesn't get evaluated until it is needed.
>>
>> Maybe what we need is a way to programmatically "force" evaluation of
>> some template-code? Then if a snippet has an embed passed into it, it
>> can choose to "force" that embed to evaluate before doing further
>> processing on it.
>>
>> --j
>>
>> On Thu, Sep 11, 2008 at 2:49 PM, David Pollak <[EMAIL PROTECTED]> wrote:
>>     
>>> Kris,
>>>
>>> I don't think I understand your question.
>>>
>>> Lift does do things differently than Rails as it evaluates outside in rather
>>> than inside out.  Thus:
>>>
>>> <lift:MySnippet>
>>>
>>> <this>Some random text</this>
>>> <that><lift:comet type="CometComponent"/></that>
>>>
>>> </lift:MySnippet>
>>>
>>> If MySnippet chooses "this" or "that"... a CometComponent will only be
>>> invoked if MySnippet returns XHTML containing <lift:comet
>>> type="CometComponent"/>
>>>
>>> If you are trying to embed a <lift:embed .../> in the body of a snippet...
>>> e.g.:
>>>
>>> <lift:MySnippet>
>>>   <lift:embed .../>
>>> </lift:MySnippet>
>>>
>>> The snippet will get <lift:embed .../> passed in as the NodeSeq rather than
>>> the expanded XHTML contained in the template.
>>>
>>> Thanks,
>>>
>>> David
>>>
>>>
>>>
>>> Kris Nuttycombe wrote:
>>>
>>> It appears that if I use <lift:embed .../> to embed a template,
>>> bindings that I have declared that would be interpreted properly in
>>> the embedding template are not propagated to the embedee. Is this by
>>> design? How can I facilitate this sort of template reuse?
>>>
>>> I had hoped that <lift:embed> might be somehow analogous to Rails's
>>> render :partial where state is propagated downward into the embedded
>>> template, but this doesn't appear to be the case.
>>>
>>> Thanks,
>>>
>>> Kris
>>>
>>>
>>>
>>>
>>>       
>
> >
>   

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to