[TYPO3-english] TYPO3 mobile webpages, WURFL

La Farge Douglas doug at gcnpublishing.com
Thu Nov 19 00:01:27 CET 2009


Hi All,

I've gone through Dmitry's tutorial three or four 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 seem to be running into the same problem as a few on this list.

Render Type: 
Is empty. (However 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'm using in iPhone, BTW.  (I also tried the emulator).

Thanks,
doug


-+-+-+-+-+-+-+-+-+-+-+-+-+
Doug La Farge
GCN Publishing, Inc.
Internet Design, Development and Consulting For Today's Media Companies
http://www.gcnpublishing.com
203.665.6211 x209



More information about the TYPO3-english mailing list