Author Topic: Multiple templates (based on browser)  (Read 16044 times)

0 Members and 1 Guest are viewing this topic.

Offline rejetto

  • Administrator
  • Tireless poster
  • *
  • Posts: 12890
    • View Profile
Re: Multiple templates (based on browser)
« Reply #15 on: April 03, 2012, 07:41:26 PM »
it depends on how you "add" it.
try the method suggested above

Offline hihihi123hk

  • Occasional poster
  • *
  • Posts: 1
    • View Profile
Re: Multiple templates (based on browser)
« Reply #16 on: April 08, 2012, 06:35:54 AM »
Can I have two RAWR template to switch??

one for  ipad/iphone

one for normal window

I try the above code but  it can't load it

Offline rejetto

  • Administrator
  • Tireless poster
  • *
  • Posts: 12890
    • View Profile
Re: Multiple templates (based on browser)
« Reply #17 on: April 15, 2012, 01:03:07 PM »
if you want multiple templates you have to read the rest, not just the my last answer

http://www.rejetto.com/forum/index.php/topic,9166.msg1052455.html#msg1052455

Offline nooy

  • Occasional poster
  • *
  • Posts: 7
    • View Profile
Re: Multiple templates (based on browser)
« Reply #18 on: August 08, 2013, 12:45:21 PM »
the {.get|agent.} is a facility that currently doesn't support android.
anyway you can use something like
{.if|{.pos|android|{.header|User-Agent.}.}|{:
  {.load tpl|myOtherTemplate.tpl .}
:}.}


and yes, you can use a full path for the file


Please show an example of how and where to insert this code.
If it should be inserted in the TPL - please show by example. I do not understand where to insert it.
And another question: Can I do that with the browser loads a template from another iphone on the third Android device? Or at least two options, one for browser on a computer, the other on mobile

Offline rejetto

  • Administrator
  • Tireless poster
  • *
  • Posts: 12890
    • View Profile
Re: Multiple templates (based on browser)
« Reply #19 on: August 16, 2013, 09:29:07 PM »
you can repeat the thing and get how many templates you want.

How to use it was explained here

probably the best solution is to ALT+F6 and paste something like this

[+request]
{.if|{.{.get|agent.} = iphone.}|{:
  {.load tpl|myOtherTemplate.tpl .}
:}.}

Offline nooy

  • Occasional poster
  • *
  • Posts: 7
    • View Profile
Re: Multiple templates (based on browser)
« Reply #20 on: August 21, 2013, 07:38:54 PM »
you can repeat the thing and get how many templates you want.

How to use it was explained here
:(

I need that with a computer's browser opened a template for example terayon, and when coming from mobile devices and iphone andoid opened PABP such as a template.

How to do it?

I have read this entire post.

That's what I do:
I go to the HFS click ALT + F6 opens the file:

insert:

{. if | {. pos | android | {. header | User-Agent.}.} | {:
   {. load tpl | http://liners.com/imig/mobail.tpl.}
:}.}

template does not work on mobile devices

What I doing wrong?

how to insert into one HFS two templates? One for mobile devices. another for desktop computers?
Is that even possible? Or should we open two HFS program?

Offline rejetto

  • Administrator
  • Tireless poster
  • *
  • Posts: 12890
    • View Profile
Re: Multiple templates (based on browser)
« Reply #21 on: August 24, 2013, 11:59:22 AM »
1. you didn't paste the whole text, missing one line
2. you shouldn't load the template from the net, that's damn slow. Download it on your computer first.

Offline nooy

  • Occasional poster
  • *
  • Posts: 7
    • View Profile
Re: Multiple templates (based on browser)
« Reply #22 on: August 27, 2013, 05:34:44 PM »
1. you didn't paste the whole text, missing one line
2. you shouldn't load the template from the net, that's damn slow. Download it on your computer first.

That's what I do:
I go to the HFS click ALT + F6 opens the file:

That's what I put in - so, too, does not work  :( (*does not load the template on your mobile device)

[+request]
{.if|{.pos|android|{.header|User-Agent.}.}|
{:{.load tpl|mytempleate-1.1.tpl .}:}.}

Show how to write?

Offline Mars

  • Operator
  • Tireless poster
  • *****
  • Posts: 1842
    • View Profile
Re: Multiple templates (based on browser)
« Reply #23 on: September 18, 2013, 07:27:58 PM »
if your template mytempleate-1.1.tpl is  not in the same folder as HFS.EXE,

then you have to put an entire valid path for it, as

[+request]
{.if|{.pos|android|{.header|User-Agent.}.}|
{:{.load tpl|c:\hfs\mytempleate-1.1.tpl .}:}.}
« Last Edit: September 18, 2013, 07:30:26 PM by Mars »

Offline MelkiyProd.

  • Occasional poster
  • *
  • Posts: 69
  • Languages: English, Русский, Українська.
    • View Profile
Re: Multiple templates (based on browser)
« Reply #24 on: March 08, 2014, 07:53:08 PM »
I've done the same in "event" -
Code: [Select]
[+request]
{.if|{.pos|iPhone|{.header|User-Agent.}.}|
{:{.load tpl|d:\Server\mobile\iPhone\iPhone.tpl .}:}.}

Everything works, but why if I add new page, for example [not found] - doesn't work? But [not found] page works from main template. Help plz

Offline rejetto

  • Administrator
  • Tireless poster
  • *
  • Posts: 12890
    • View Profile
Re: Multiple templates (based on browser)
« Reply #25 on: March 10, 2014, 01:14:04 AM »
thanks for reporting.
if you don't want to wait for the day a new version is officially published ou can find a temp version at http://ge.tt/4NZ1LjP1/v/0

Follow members gave a thank to your post:


Offline MelkiyProd.

  • Occasional poster
  • *
  • Posts: 69
  • Languages: English, Русский, Українська.
    • View Profile
Re: Multiple templates (based on browser)
« Reply #26 on: March 11, 2014, 01:36:12 PM »
thanks for reporting.
if you don't want to wait for the day a new version is officially published ou can find a temp version at http://ge.tt/4NZ1LjP1/v/0

nice  :) But these pages (not found, deny, overload...etc) load css from the main template, others normally works  :)

Offline rejetto

  • Administrator
  • Tireless poster
  • *
  • Posts: 12890
    • View Profile
Re: Multiple templates (based on browser)
« Reply #27 on: March 11, 2014, 11:14:42 PM »
you mean it doesn't work?

Offline MelkiyProd.

  • Occasional poster
  • *
  • Posts: 69
  • Languages: English, Русский, Українська.
    • View Profile
Re: Multiple templates (based on browser)
« Reply #28 on: March 12, 2014, 09:43:48 PM »
As I know these pages created in new template must be without design.
I mean if I write

Code: [Select]
[Not found]
Test

that page must have only text, but my second template automatically loads css from main template and I think so should not be.
If I'm wrong, sorry  :)

Offline rejetto

  • Administrator
  • Tireless poster
  • *
  • Posts: 12890
    • View Profile
Re: Multiple templates (based on browser)
« Reply #29 on: March 15, 2014, 12:01:24 AM »
i know what you mean.
i was undecided about it, because both ways make sense.
for now i opted for this way, to keep the old template living under the one you load, because you can always override it.
In your case, that happens because you didn't define [error-page]
try!