WAP/Mobile Site & Template Selection

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
SN3

WAP/Mobile Site & Template Selection

Post by SN3 »

Hello all,

It's been a long time since I've been over here but I love the great things that you guys are doing!  Thanks and nice work!

Anyway, I'm working with a nonprofit organization and we are trying to develop a WAP/mobile version of our website.  I have already made adjustments to the Google Sitemap module and made it display the names of the pages and make them linked.  I am looking for a way to use this code:

Code: Select all

		echo ' <a href='		. $onecontent->GetURL()  . '> '. $onecontent->Name()  . '</a>'. "\n";
and add a simple piece of coding, to make it something like:

Code: Select all

		echo ' <a href='		. $onecontent->GetURL()  . [b]index.php?template=newtemplate[/b]'> '. $onecontent->Name()  . '</a>'. "\n";
Basically, I want to make a template without images (or minimal images) and edit this code to select that template for every page.  Is this possible?  Is there a simple line I can add to tell the page externally which template to use?  I would also need to make a way for the internal links on the pages add the extension so all pages show up with that template.  Does that make sense?  Possible?  Thanks!
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: WAP/Mobile Site & Template Selection

Post by Dr.CSS »

Can't make a CSS for mobile and check that box at the bottom then when a visitor is using mobile phone they only get that styling?...
SN3

Re: WAP/Mobile Site & Template Selection

Post by SN3 »

I was originally going to go with CSS, but the site is really template-controlled and the CSS doesn't do much with the images.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: WAP/Mobile Site & Template Selection

Post by Dr.CSS »

If you have mobile CSS you can set it to not show images, actually it wouldn't have the calls for images unless you call them, it would be a stripped down ver. of your other CSS...

I am under the impression that if a mobile device is calling up your page/s that it will only be fed the CSS marked for mobile and no others, I don't have a mobile data plan to test it...
SN3

Re: WAP/Mobile Site & Template Selection

Post by SN3 »

That's a great point!  However, I still want to show images.  I really just need to have a separate template for mobile devices, especially since the navigation needs to be re-done (the many drop downs won't work correctly). 
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm
Location: Comox Valley, BC

Re: WAP/Mobile Site & Template Selection

Post by Nullig »

Have you tried using the "Handheld" stylesheet that comes with CMSMS?

Nullig
SN3

Re: WAP/Mobile Site & Template Selection

Post by SN3 »

No, but the stylesheet really isn't the issue.
SN3

Re: WAP/Mobile Site & Template Selection

Post by SN3 »

Any ideas?  All I really need at this point is for there to be some sort of external template selection where it uses a different template if you are on a mobile device.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: WAP/Mobile Site & Template Selection

Post by Dr.CSS »

Have you googled for device detection JS?...
SN3

Re: WAP/Mobile Site & Template Selection

Post by SN3 »

A JS script to detect browsers? 
alby

Re: WAP/Mobile Site & Template Selection

Post by alby »

SN3 wrote: A JS script to detect browsers? 
Look this

Alby
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: WAP/Mobile Site & Template Selection

Post by Dr.CSS »

Great find alby... ;)
SN3

Re: WAP/Mobile Site & Template Selection

Post by SN3 »

Thanks for the link!  How can I combine the detection script with changing the template on the page?
SN3

Re: WAP/Mobile Site & Template Selection

Post by SN3 »

Any updates on how to do external template selection?
alby

Re: WAP/Mobile Site & Template Selection

Post by alby »

SN3 wrote: Any updates on how to do external template selection?
IMHO
Current I don't think is possible.
Maybe you can redirect (after browser detection) to new wap page

Alby
Last edited by alby on Wed Sep 12, 2007 8:05 am, edited 1 time in total.
Post Reply

Return to “Developers Discussion”