[TYPO3-dev] FAL in an Extbase 6.0 extension... but how?!

Henjo Hoeksma | Stylence me at henjohoeksma.nl
Fri Feb 1 05:54:03 CET 2013


Hi both,

thanks for sharing your insights. I need to be working on this asap, so I
might give some insights on my approach when I get there ;-)

Kind regards,

Henjo

Problems are small because we learned how to deal with them.
Problems are big because we need to learn how to deal with them.


On Thu, Jan 31, 2013 at 8:39 PM, Andreas Kiessling <andreas.kiessling at web.de
> wrote:

> Hi,
>
> i used a different approach to render images/files (for read-only access):
>
>
> <f:cObject typoscriptObjectPath="lib.singleImage" data="{uid:
> yourObject.uid}" />
>
> lib.singleImage = FILES
> lib.singleImage{
>   references {
>     table = your_table
>     uid.field = uid
>     fieldName = your_field
>   }
>
>   renderObj = COA
>   renderObj {
>     10 = IMAGE
>     10 {
>       file.import.data = file:current:publicUrl
>       file.maxW = 281
>       altText.data = file:current:alternative
>       titleText.data = file:current:title
>     }
>   }
> }
>
>
> The only real "problems" i encountered were:
>
> - if you need to support multilanguage, add something like this to your
> model, because .uid always is always set to the one from default language:
>
> /**
>  * Returns the real uid for the record to use with FAL TS
>  *
>  * @return \integer
>  */
> public function getRealUid() {
>         return ($this->_localizedUid ? $this->_localizedUid : $this->uid);
> }
> and pass uid: model.realUid from the ViewHelper
>
> - I tried to pass a whole "news" model to the cObject ViewHelper and got
> stuck with some weird DateTime conversion/mapping errors, so i went for
> the uid due to lack of time to investigate further.
>
> - probably not working with workspaces (luckily i did not need that
> right now)
>
>
> Have a look at tt_content.uploads.20 for a lot of examples (or the TS
> documentation
>
> http://docs.typo3.org/typo3cms/TyposcriptReference/ContentObjects/Files/Index.html
> ) and ContentObjectRenderer->getFileDataKey for possible fields to use
> (or just use the columns like in the db, e.g. if you extend
> sys_file_reference)
>
> HTH,
> Andreas
> _______________________________________________
> 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