[TYPO3-dev] Use header image uploaded by user in extension

Brian Bendtsen nightowl at galnet.dk
Mon Aug 20 15:26:53 CEST 2007


Hi

I have made it possible for my users to change their logo with this 
typoscript, also typically used when a BE user can change a header image:

lib.logo = IMAGE
lib.logo {

# Default image if no image is inserted on the page
   file = fileadmin/user_upload/Esbjergbolig/eblogo_stor.jpg
   file.import.data = levelmedia: -1, "slide"

# Folder to upload the userdefined images to
   file.import = uploads/media/
   file.import.listNum = 0
   file.import.override.field = media
   file.height = 125
}

I have made an extension that allows the BE users to enter a lot of data 
in tables and this data is displayed on a page. I have made a html 
template for this extension and it looks something like:

<!-- ###TEMPLATE_BEBOERINFORMATION### begin -->
<p>###page_header###</p>
<p>###page_logo###</p>
<p>###page_info_from_table_record###</p>
<p>###page_info_from_table_record###</p>
<p>###page_info_from_table_record###</p>
<!-- ###TEMPLATE_BEBOERINFORMATION### end -->

In my php code I replace markers with code like:
$substArray['###page_header###'] = 
$this->pi_getLL('tx_myplugin_header','header');

How do I replace the logo marker so it fetches the logo the user has 
uploaded?

/Brian




More information about the TYPO3-dev mailing list