Page 2 of 2

Re: WAP/Mobile Site & Template Selection

Posted: Sat Sep 15, 2007 2:29 am
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!

Re: WAP/Mobile Site & Template Selection

Posted: Sat Sep 15, 2007 3:12 am
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.

Re: WAP/Mobile Site & Template Selection

Posted: Sat Sep 15, 2007 8:55 am
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

Re: WAP/Mobile Site & Template Selection

Posted: Sat Sep 15, 2007 2:37 pm
by SN3
Okay, I'm going to have to take a look at this and see what I can figure out.  Thanks!

Re: WAP/Mobile Site & Template Selection

Posted: Sun Oct 14, 2007 8:22 pm
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.