[TYPO3-dev] FAL- Add an image to a TYPO3 record (tx_news) from 3. party script

Frans Saris franssaris at gmail.com
Sun May 4 13:17:08 CEST 2014


Or just use the importer like Georg does in his mailtonews extension.

https://github.com/georgringer/mailtonews

Gr. Frans
Op 4 mei 2014 12:35 schreef "Marc Bastian Heinrichs" <typo3 at mbh-web.de>:

Hi,

> I'm developing a third party php app for adding news records to a TYPO3
> site. The news extension is tx_news.
>
> I have a problem with the news images. They don't show on the website
> unless you edit the news record from the TYPO3 backend. When I edit the
> news record, I see the image relation, so I just edit and save, without
> making any changes.
>
> I guess its related to FAL and some kind of index problem.

Only the current master version uses FAL for the images.

> What I do is upload the images to uploads/tx_news/ and insert a record
> into tx_news_domain_model_media but obviously I need something more.

I suggest to work with the models and the NewsRepositiory.
add a object of Tx_News_Domain_Model_Media with addMedia() to your
news model object and saving the news model should do the job right.

Best
Maba

_______________________________________________
TYPO3-dev mailing list
TYPO3-dev at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-dev



More information about the TYPO3-dev mailing list