rejetto forum

Multiple templates (based on browser)

0 Members and 1 Guest are viewing this topic.

Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13521
    • View Profile
it depends on how you "add" it.
try the method suggested above


Offline hihihi123hk

  • Occasional poster
  • *
    • Posts: 1
    • View Profile
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: 13521
    • View Profile

Offline nooy

  • Occasional poster
  • *
    • Posts: 7
    • View Profile
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: 13521
    • View Profile
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
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: 13521
    • View Profile
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
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: 2063
    • View Profile
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: 70
  • Languages: English, Русский, Українська.
    • View Profile
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: 13521
    • View Profile
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


Offline MelkiyProd.

  • Occasional poster
  • *
    • Posts: 70
  • Languages: English, Русский, Українська.
    • View Profile
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: 13521
    • View Profile

Offline MelkiyProd.

  • Occasional poster
  • *
    • Posts: 70
  • Languages: English, Русский, Українська.
    • View Profile
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: 13521
    • View Profile
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!