[TYPO3-german] Ext:news - PDF (relatedFile) in neuem Fenster ffnen ???

Johannes C. Laxander jc at laxander.com
Wed Feb 3 19:46:50 CET 2016


Hallo Hans,

hab den Aufruf wie von dir angegeben auch schon getestet und jetzt nochmal probiert - gleiches Ergebnis.
Hab jetzt festgestellt, dass mein Template gar nicht angezogen wird.
Im TypoScript Object Browser wird mir aber die Configuration angezeigt:

  [view]
    [templateRootPaths]
     [0] = EXT:news/Resources/Private/Templates/
     [1] = fileadmin/website/Resources/Private/Extensions/News/Templates/
    [partialRootPaths]
     [0] = EXT:news/Resources/Private/Partials/
     [1] = fileadmin/website/Resources/Private/Extensions/News/Partials/
    [layoutRootPaths]
     [0] = EXT:news/Resources/Private/Layouts/
     [1] = fileadmin/website/Resources/Private/Extensions/News/Layouts/

Die Pfadangaben stimmen und Templates sind dort auch vorhanden. Ich versteht das nicht mehr. Das ist ja nicht die erste Installation in der ich die News-Extension nutze!???
Hast du dazu noch ne Idee?

Johannes.

> -----Ursprüngliche Nachricht-----
> Von: typo3-german-bounces at lists.typo3.org [mailto:typo3-german-
> bounces at lists.typo3.org] Im Auftrag von MB-Süd
> Gesendet: Mittwoch, 3. Februar 2016 14:52
> An: typo3-german at lists.typo3.org
> Betreff: Re: [TYPO3-german] Ext:news - PDF (relatedFile) in neuem Fenster
> ffnen ???
> 
> Hallo Johannes,
> 
> die Version hab ich im Einsatz und bei mir geht es. Schau dir mal diesen
> ViewHelper an: FileDownloadViewHelper (in Classes/viewhelper/format). Er
> hat als Parameter target:
> 
> class Tx_News_ViewHelpers_Format_FileDownloadViewHelper extends
> \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper {
> 
> 	/**
> 	 * Download a file
> 	 *
> 	 * @param string $file Path to the file
> 	 * @param array $configuration configuration used to render the
> filelink cObject
> 	 * @param boolean $hideError define if an error should be displayed
> if file not found
> * 	 * @param string $class optional class
> * 	 * @param string $target target
> * 	 * @param string $alt alt text
> * 	 * @param string $title title text
> 	 * @return string
> 	 * @throws
> \TYPO3\CMS\Fluid\Core\ViewHelper\Exception\InvalidVariableException
> 
> Einfach diesem Viewhelper beim Aufruf ein target="_blank" mitgeben und
> schon gehts du kann auch zusätzliche Klassen mit angeben( so dass vor deine
> Files z.B. das jeweilige Symbol kommt).
> 
> <n:format.fileDownload file="{relatedFile.file}"
> configuration="{settings.relatedFiles.download}" target="_blank"> <f:if
> condition="{relatedFile.title}">
> <f:then><f:format.raw>{relatedFile.title}</f:format.raw>
> </f:then>
> <f:else>{relatedFile.file}
> </f:else>
> </f:if>
> </n:format.fileDownload>
> 
> Soll ich dir mal mein template schicken?
> 
> Gruß
> Hans
> _______________________________________________
> TYPO3-german mailing list
> TYPO3-german at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-german



More information about the TYPO3-german mailing list