[TYPO3-english] Load register if cObject is empty

Ronald Renfro rlr55555 at googlemail.com
Tue Mar 8 15:47:24 CET 2011


Hi,

currently I am working on a template which imports an Image from the media field. If no image has been uploaded I need to modifiy the css declaration of the id #normal which appears later in the typoscript. I have tried using LOAD_REGISTER to set a flag (sectionMediaEmpty) and a condition to evaluate... but the condition does not seem to "see" the register. What am I missing?

The relevant typoscript:

20 = COA
20 {
	
	10 = IMAGE
	10 {
		file.import.data = levelmedia: -1, "slide"
		file.import = uploads/media/
		file.import.listNum = 0
		file.import.override.field = media
		params = id="section_headline"
		stdWrap.required = 1
		stdWrap.ifEmpty.cObject = LOAD_REGISTER
		stdWrap.ifEmpty.cObject.sectionMediaEmpty = 1	
	 }
	 
 }


[globalVar = TSFE:register:sectionMediaEmpty = 1]
    page.CSS_inlineStyle (
        #normal { padding:10px 0px 0px 0px !important; }	
)
[global]


Thanks for any help!

Ronald Renfro


More information about the TYPO3-english mailing list