[TYPO3] How to use file references

Ernesto Baschny [cron IT] ernst at cron-it.de
Wed Apr 26 22:42:00 CEST 2006

Robert Markula schrieb am 26.04.2006 20:04:

> I've heard much that directly referencing files instead of copying them
> to uploads/ will be possible with DAM. But I didn't find much
> documentation on that and the documentation which I found is pretty
> useless in this regard (dam and dam_ttcontent documentation).
> My questions are:
> 1. How do I enable file referencing?

Just install dam and dam_ttcontent. Upon installation of dam_ttcontent
you will have some options on where the "references" will apply.

> 2. Once enabled, is it enabled for all content elements and extensions?

The dam_ttcontent simply modifies the TypoScript for the rendering of
the tt_content "imgtext" and "image" content objects. So any other
extension or content elements are unaffected by this. If you want to do
that in your extension, just follow the example in dam_ttcontent (you
just need to get the list of files from a field through an API-call to DAM).

> 3. What about the files which were used in content elements prior to
> enable file referencing? Will they continue to use the file copy in
> uploads/ or can they be automagickally 'converted' to use the original
> files in fileadmin/? If not, would I really have to re-import them in
> every content element that I use?

Either you use the copied files, or you use the references to DAM
objects. I don't think there is currently a way to "migrate" information
from old tt_content-hardcoded image paths to DAM-objects.

> 4. Are there any things to be noticed about when using file references?

I don't think so.

> 5. And finally: How stable is file referencing?

As stable as you want it to be. It works, and its a pretty simple
concept, as it uses "standard" TYPO3 features: fields with MM-relations
to other objects (for the "reference") and userFunc for the TypoScript
part that will handle the rendering (for de-referencing the objects back
to files). It won't automatically change all your "file" fields into
"reference" fields, you have to do that on your own in your extensions.


More information about the TYPO3-english mailing list