[TYPO3-english] TYPO3 mobile webpages, WURFL
Stig Kjeldsen
sk at itu.dk
Wed Sep 9 15:00:51 CEST 2009
Hello Victor
I'm facing problem with the tutorial from Dmitry.
I have followed the manual, but can't get it to work. Like you my
"Render Type" is empty (4), but when I edit the TO, 'Mobile version' is
presented in the dropdown. Did you solved this?
Best regards
Stig Kjelsen
Victor Livakovsky skrev:
> 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