[TYPO3-english] TYPO3 mobile webpages, WURFL

La Farge Douglas doug at gcnpublishing.com
Thu Dec 31 21:51:20 CET 2009


Hi All,

I've gone through Dmitry's tutorial at least a half of dozen times.
http://dmitry-dulepov.com/article/creating-a-mobile-version-of-a-web-site.html

I also went through all the posts on this list as seen here:

http://www.typo3-jack.net/typo3-english-lists-netfielders-de/19552-typo3-english-typo3-mobile-webpages-wurfl.html

I'm using the latest version of TV on a fresh install of Typo3.  I've noticed the latest version of TV does not need the patch added.

I continue to run into the same problem - Render Type for mobile is empty wever it is in the TO "Select Type of Rendering" Drop down).

If I change that setting to "Print Friendly" Render Type: populates.

In reading the list thread it seems a step was left out the loads the php.

Just for fun (well not really) I removed the conditional thus requiring the childTemplate to be used (and the php not be called to check):
#[userFunc = user_isMobile]
plugin.tx_templavoila_pi1.childTemplate = USERFUNC:user_mobile->getChildTemplate
plugin.tx_templavoila_pi1.childTemplate.value = mobile
#[global]

page = PAGE
page{
typenum = 0
10 < plugin.tx_templavoila_pi1
10.userFunc = tx_templavoila_pi1->main_page
includeCSS {
 file1 = fileadmin/css/{$directory}/layout.css
 file2 = fileadmin/css/{$directory}/content.css
}
meta.keywords.override.field = keywords
meta.description.override.field = description
#config.no_cache = 0
config.index_enable = 0
}


Would not the above TS mean that any browser should output the mobile template (TO)?



Dmitry responded to Victor's email in this list with:
"
Victor Livakovsky wrote:
> 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)

This is a bit suspicious.
"
This remains suspicious, yes?

My patch has been applied correctly:
	// Initialize rendering type:
				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' : '';
				}

I also went so far as to look in tx_templavoila_templobj table.  the field rendertype is populated with "mobile".

I'm using in iPhone, BTW.  (I also tried the emulator).

Thanks,
doug





More information about the TYPO3-english mailing list