[TYPO3-english] TYPO3 mobile webpages, WURFL
Victor Livakovsky
v-tyok at mail.ru
Thu Apr 9 14:22:54 CEST 2009
Hi, Dmitry.
> Here it is:
> http://dmitry-dulepov.com/article/creating-a-mobile-version-of-a-web-site.html
I've followed your manual, but somehow can't see a content of mobile
pages. And I can't understand, where am I wrong...
Here are my steps:
1. Created separate HTML/CSS template for mobile pages.
2. Patched /typo3conf/ext/templavoila/pi1/class.tx_templavoila_pi1.php
so now, starting from line 307 it contains:
if ($this->conf['childTemplate']) {
$renderType = $this->conf['childTemplate'];
if (substr($renderType, 0, 9) == 'USERFUNC:') {
$conf = array(
'conf' =>
is_array($this->conf['childTemplate.']) ? $this->conf['childTemplate.']
: array(),
'toRecord' => $row
);
$renderType =
t3lib_div::callUserFunction(substr($renderType, 9), $conf, $this);
}
} else { // Default:
$renderType = t3lib_div::GPvar('print') ? 'print' : '';
}
3. Added to root page TS Config such line:
TCEFORM.tx_templavoila_tmplobj.rendertype.addItems.mobile = Mobile version
4. Created new TO with "Mobile version" type of rendering. (by the way,
when I look at this TO at TV module it's filed "Render Type:" contain
nothing, but when I edit it "Mobile version" is presented at drop-down menu)
5. Placed your PHP script into 'fileadmin/' directory.
6. Added before including TV plugin at TS template:
[userFunc = user_isMobile]
plugin.tx_templavoila_pi1.childTemplate =
USERFUNC:user_mobile->getChildTemplate
plugin.tx_templavoila_pi1.childTemplate.value = mobile
[global]
7. Cleaned the HTML output.
And mobile phone shows still normal version.
I also tried to comment the condition [userFunc = user_isMobile] - so,
the mobile template should be applied at 'normal' browser, but nothing
happened.
Then I realised, that 'fileadmin/user_mobile.php' isn't included
anywhere. So I added such line:
includeLibs.user_mobile = fileadmin/user_mobile.php
but it also made no effect.
Where an I wrong? Maybe, I forgot something?
Thank you in advance.
More information about the TYPO3-english
mailing list