Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2011-07-28 21:33:23

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: Automatic mobile theme switching?

Textpattern by it’s design is not particularly plug-and-play (its more like a set of building blocks) whereas wordpress can be a little too plug-and-play unless you want to do a little wrestling with it’s code. that approach has paid dividends for them userwise and created huge market for themes and things like wptouch.

But… I think this feature could be achieved on textpattern too by an adept plugin author working with a theme designer, and there are certainly those calling for making textpattern more theme friendly to woo in new users, so who knows.

Offline

#14 2011-07-29 01:18:33

sacripant
Plugin Author
From: Rhône — France
Registered: 2008-06-01
Posts: 479
Website

Re: Automatic mobile theme switching?

I do not know if I understood everything.
I’ve never used adi_mobile and co.

But if your template is based a single page. You may be able to move it to a misc-form desktop-page.misc.txp

And simply put on your page default.

<txp:adi_if_mobile>
<txp:output_form form="mobile-page" />
<txp:else />
<txp:output_form form="desktop-page" />
</ txp: adi_if_mobile>

Well, your template will only use forms.
But you can put a prefix mobile for your new mobile theme and not touch the desktop theme.

I have not tested. Just an idea.

Offline

#15 2011-07-29 08:31:36

Zanza
Plugin Author
Registered: 2005-08-18
Posts: 699
Website

Re: Automatic mobile theme switching?

This idea is the closer to what I was looking for. There still is the need to change existing theme in a way, but with less effort I can think of for the way txp works. Not a truly automatic solution, though, but near there. I’ll look deeper into it. Thanks.

Just thinking: what would be even better? A way to change page template from inside a page template (without using forms). Sort of:

<txp:adi_if_mobile>
<-- don't use this page template: go to mobile-page instead -->
<txp:else />
<-- this template as usual -->
</ txp: adi_if_mobile>

I think there’s not a way to do it, right? Now an old thread is coming to my mind, where someone was talking about displaying one section article with the template of another… Uhm… maybe daydreaming.

Offline

#16 2012-01-20 22:36:08

WebKat
Member
Registered: 2007-01-16
Posts: 301

Re: Automatic mobile theme switching?

What I’m looking for is some way to detect a mobile device, and then display the content to them using a different page template. I don’t want to try to re-vamp my existing desktop page templates as they are too complex and too reliant on things that would be hard to change. Is there a way to do this? Have a set of mobile page templates and form templates that are called up if a mobile device is detected?



WebKat

Offline

#17 2012-01-21 07:58:50

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,028
Website GitHub Mastodon Twitter

Re: Automatic mobile theme switching?

WebKat wrote:

What I’m looking for is some way to detect a mobile device, and then display the content to them using a different page template. I don’t want to try to re-vamp my existing desktop page templates as they are too complex and too reliant on things that would be hard to change. Is there a way to do this? Have a set of mobile page templates and form templates that are called up if a mobile device is detected?

I wonder if you can achieve this if you created a section which lists content just for mobile.

Last edited by colak (2012-01-21 07:59:21)


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#18 2012-01-23 15:54:17

WebKat
Member
Registered: 2007-01-16
Posts: 301

Re: Automatic mobile theme switching?

But how would I populate that section? We aren’t allowed two sections, and everything is already assigned to a section. I don’t want different content for mobile—I want a different template for the same content.



WebKat

Offline

Board footer

Powered by FluxBB