On Tue, Aug 7, 2012 at 12:33 PM, David Pollak
<
feeder.of...@gmail.com> wrote:
> Personally, I put my template choosing logic in
> /templates-hidden/default.html
>
> Something like:
>
> <lift:ChooseTemplate>
> <lift:embed id="mobile" what="mobile_template"/>
> <lift:embed id="desktop" what="desktop_template"/>
> </lift:ChooseTemplate>
>
> Then in your ChooseTemplate snippet:
>
> object ChooseTemplate {
> def render = if (isMobile) "#mobile ^^" #> true else "#desktop ^^" #> true
> }
>
> Hope this helps.
>
>
> On Tue, Aug 7, 2012 at 6:21 AM, Tobias Pfeiffer <
tob...@tesobe.com> wrote:
>>
>> Hi,
>>
>> I got a web application with Lift up and running at
www.myhost.com, now I
>> want to add a mobile version of that app at
m.myhost.com, i.e. I need to
>> select different templates when the user visits
m.myhost.com.
>>
www.myhost.com/article/12345 should use article/star.html, but
>>
m.myhost.com/article/12345 should use m/article/star.html or so.
>> In particular, it should still be possible to have a template selected
>> depending on the locale (m/article/star_de.html).
>> Any experiences or hints on how to do that?
>>
>> Thanks
>> Tobias
>>
>>
>>
>
>
>
> --
> Telegram, Simply Beautiful CMS
https://telegr.am
> Lift, the simply functional web framework
http://liftweb.net
> Follow me:
http://twitter.com/dpp
> Blog:
http://goodstuff.im
>
>