Deutsch  English  

Extension mpossnewsheader

This extension has been sponsered by Bernhard Possenig (http://www.mediaposs.com/) - thanks a lot!

Functionality
Many websites are using the nice feature of TYPO3 to add an image in the page properties which is shown as a header image. For every page a different image.
There is just one problem with tt_news and the single-view-page because every single news will use the same header image!

The following extension and TS allows the editor to choose a seperate image inside the tt_news record which will shown as the header image. If there is no header image inside the record, the image from the page properties will be taken!

Everything is highly configurable because it is just TS!

Download
Download of the extension

TypoScript

TypoScript
#################################################################
################################ mod ringerge.org ###############
# Image from tt_news
temp.img = RECORDS
temp.img {  
	# only if there is a tt_news record shown
        if.isTrue.data = GPvar:tx_ttnews|tt_news       
	source.data = GPvar:tx_ttnews|tt_news
	tables = tt_news
	
	conf.tt_news = COA
	conf.tt_news {   
		# get the Image
		10 = IMAGE
		10 {            
                      file {
                              import = uploads/tx_mpossnewsheader/	
                              import.field = tx_mpossnewsheader_img
                              # listNum 0 = the 1st image
                              import.listNum = 0
                              # Configure the Image as always
                              #maxW = 230
                              width = 800
                              height = 370                             
                      }
                      titleText.field = title
                      altText.field = title                      
               }
      } 
}
 

# Image from the page properties
temp.imgPageProperties = IMAGE
temp.imgPageProperties{
	file.import = uploads/media/
	file.import.data = levelmedia:-1, slide
	file.import.listNum=0
}

# Take the right one
lib.banner = COA
lib.banner {
	10 = COA
	10 {  
		# if there is an image in the news record
		if.isTrue.cObject < temp.img
		30 < temp.img
	}
  
	20 = COA
	20 {
		# otherwise take the page prop image
		if.isFalse.cObject < temp.img
		30 < temp.imgPageProperties
	}
}
################################ mod ringerge.org ###############
#################################################################

Write a comment about this extension

write a comment

1 Comment
Page 1 from 1: 1

#1 JosDesign (www ) wrote at 24.01.2008 16:53 answer

Das hört sich gut an!

 

Nach so einem Feature habe ich bereits schon mal gesucht!

 

Vielen Dank!


1 Comment
Page 1 from 1: 1