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

Re: WAP/Mobile Site & Template Selection

Post by SN3 »

Anything is possible!  ;D  It's just a matter of figuring out how.  Any help would be appreciated; this is for a non-profit national business organization.  Thanks!
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: WAP/Mobile Site & Template Selection

Post by calguy1000 »

It's not possible with CMS Made Simple at the moment.  And if you do find a way to do it in CMS made simple, it is not not recommended, and not supported. 

Changing the 'layout' of a page' whilst keeping the content the same is IMHO outside of the scope of CMS.  This package is focussed on seperating layout from content, and re-using the layout.  Not the other way around. 

though, there are things that can be done to improve the flexibility of stylsheet handling.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
alby

Re: WAP/Mobile Site & Template Selection

Post by alby »

SN3 wrote: Anything is possible!  ;D  It's just a matter of figuring out how.  Any help would be appreciated; this is for a non-profit national business organization.  Thanks!
I think a similar solution
Create a home and redirect to other tree if it's a wap browser

For wap page use ContentAliases (attention in content because wap tag != html tag) and alias wap-originalcontentalias

Maybe an other solution for all pages (UNTESTED) or hack index.php (check in forum for other wap topic):
an UDT to top of "normal" template that check for wap browser and redirect to:
header("Location: index.php?page=wap-alias");
(check in forum for retrieve alias page in UDT)

Alby
SN3

Re: WAP/Mobile Site & Template Selection

Post by SN3 »

Okay, I'm going to have to take a look at this and see what I can figure out.  Thanks!
SN3

Re: WAP/Mobile Site & Template Selection

Post by SN3 »

For those interested, I did get this working!  I created a new index.php page called index_wap.php.  Line 249 is changed to:

Code: Select all

	$html = $smarty->fetch('template:notemplate') . "\n";
Then, I hacked the google sitemap script (now named wap.php) to do the following:

Code: Select all

echo ' <loc><a href=http://www.websitename.org/index_mobile.php?page='		. $onecontent->alias()  . '> '. $onecontent->Name()  . '</a></loc>'. "\n";

After that, I just made a subdomain blah.website.org, made the index file include the wap.php page and everything is good to go.  I'll now see if I can get browser detection working.
Post Reply

Return to “Developers Discussion”