[TYPO3] plugin.tx_...

Dmitry Dulepov [typo3] dmitry at typo3.org
Wed Aug 20 08:43:17 CEST 2008


Hi!

Alessandro Vernet wrote:
> Are you referring to this tutorial:
> 
> http://typo3.org/documentation/document-library/tutorials/player_profile_basic/0.0.8/view/1/2/

Yes.

> The plugin defined in this tutorial (player_profile) seems to be using a
> "preference" there: $plugin.player_profile.maxW_single. A default value of
> 70 is defined in ext_typoscript_constants.txt. But the tutorial doesn't seem
> to cover (maybe this is out of scope?):

This approach is dated :( You should use kickstarter, which generates more modern approach.

> 1) How to access the value of this property in PHP code?

If you have this TS:

plugin.tx_myext_pi1 = USER
plugin.tx_myext_pi1 {
	a = b
	a {
		c = e
	}
}

you can access properties as:

$a = $this->conf['a'];
$c = $this->conf['a.']['c']; // Notice period after "a"!

> 2) How, as an administrator, to set the value of this property for a certain
> hierarchy of pages.

Use Web>Template, "Constant editor" there. There is a box at the top where you can select a set of constants.

-- 
Dmitry Dulepov
TYPO3 Core team
My TYPO3 book: http://www.packtpub.com/typo3-extension-development/book
In the blog: http://typo3bloke.net/post-details/should_abbreviations_be_used_in_the_code/


More information about the TYPO3-english mailing list