Task #13618
Implement DAM support (again)
| Status: | Resolved | Start date: | 2011-03-04 | |
|---|---|---|---|---|
| Priority: | Should have | Due date: | ||
| Assignee: | Georg Ringer | % Done: | 100% |
|
| Category: | Core | |||
| Target version: | 1.2.0 | |||
| TYPO3 Version: | Has patch: | |||
| PHP Version: | Complexity: | |||
| Votes: | 1 (View) |
Description
a viewhelper is needed as there is no special DAM model connection anymore.
i guess extbase_dam conector can be dropped then ...
History
Updated by Felix Nagel almost 2 years ago
We would love to use the new news system but need DAM support and I would like to ask if there is any progress on this issue?
What is missing to make this work again? Am I right it never worked fully in the versions before?
Please help me to understand what have already been done.
Updated by Georg Ringer almost 2 years ago
the question is rather: which features of DAM do you need?
I once did a basic implementation for DAM and images but dropped it because I would like to do it for 100% instead of just a basic implementation.
- media relation
- good implementation for list/single view
- file relation
- ... more?
- Can you provide patches or at least support for testing?
- Can you sponsor it?
- What is your time frame?
Updated by Felix Nagel almost 2 years ago
Thanks for updating the trunk.
Our current project only needs basic image support via DAM and Im able to provide some testing and bugfixing for that.
The current trunk wont work as there are two errors:- missing ) in line 104 of Classes\Hooks\Labels.php
- PHP Error: "Call to a member function reset() on a non-object in typo3/sysext/fluid/Classes/Core/ViewHelper/AbstractTagBasedViewHelper.php on line 87" in detail view when using one of the FB view helpers
Am I wrong or did your implementation never worked yet? The output was missing, correct?
When I revert some changes, like revision 4269d57b (so we have a new if in MediaContainer.html and a new detail partial MediaDam.html) there is only a message that a view helper is still missing. Afaics there is no way to use a viewhelper here as the nedded info (dam uid) is missing in object mediaElement.
I will try to modify the model to work with DAM.
Updated by Georg Ringer almost 2 years ago
Hi,
sorry for the regression with the label, fixed that know too.
I don't about problems of the VH in single view, can you debug that a bit or provide a seperate patch?
correct, the output is currently missing and I don't really know if I should include EXT:extbase_dam or do everything just in a VH. maybe the latter will be the better for the start.
Updated by Felix Nagel almost 2 years ago
I assume its not possible to use a VH as the needed uid of the dam file is not present in the mediaElement object used in the MediaDam partial.
To reproduce the second issue just use the latest trunk version with default template which includes the FB marker. Im not able to debug this as we currently do not need this feature.
I prefer fixing the Model so we have a strict separation between Model, View, Control. I will post my version here when its working.
Updated by Georg Ringer almost 2 years ago
IMO should this be no problem because you can always do a viewhelper with the given news uid and code like this
$config = $GLOBALS['TCA']['tx_news_domain_model_media']]['columns']['dam']['config'];
$damItems = tx_dam_db::getReferencedFiles('tx_news_domain_model_media', $newsUid, $config['MM_match_fields'], $config['MM'], 'tx_dam.*');
Updated by Felix Nagel almost 2 years ago
- File DamViewHelper.php added
Thanks for your snippet. Ive ended up making a little view helper as Im not quite into extbase and struggeled where / if to extend the Repositiory or the Controller.
I attached my VH as it could be useful for others. Its tested for images but it should work for other media types, too. There for the fields in BE IRRE needs to be DAM aware.
Use it like this:
<n:dam element="{mediaElement}" dam="damArray">
<f:image src="{mediaElement.image}" title="{mediaElement.title}" alt="{mediaElement.alt}" maxWidth="{settings.detail.media.image.maxWidth}" />
</n:dam>
It changes some attributes within the mediaElement object and enables you tu use every DAM field via damArray. If there are no title or alt texts, the VH will use DAM values if possbible.
Is there a special cause you did not use the MEDIA element for rendering audio and video contents?
Updated by Georg Ringer almost 2 years ago
yes because I find it very limiting. please: this is not a support forum but for issue reporting. if you got questions, I am happy to answer those in the tt_news mailinglist or english mailinglist
Updated by Georg Ringer over 1 year ago
- Target version deleted (
1.1.0)
Updated by Georg Ringer over 1 year ago
- Status changed from Accepted to Needs Feedback
- Target version set to 1.2.0
hi,
can you checkout http://git.typo3.org/TYPO3v4/Extensions/news.git?a=blob;f=Classes/ViewHelpers/Format/DamViewHelper.php;h=a145c4e2ab3577cf2ba92ee66d985489d6c3442f;hb=master if this feeds your needs too?
Updated by Georg Ringer over 1 year ago
- Status changed from Needs Feedback to Resolved
- % Done changed from 0 to 100
Updated by Felix Nagel over 1 year ago
My version of DAM view helper has a little more features like overwriting meta data by flexform and more easy usage as I explicit set the new image path.
Updated by Georg Ringer over 1 year ago
true but is really possible to make every which of integreators possible? that is why I leave it to the integrator to make the fallbacks he need as he got everything he needs in the template.
so an <f:if condition="{dam.title}"> can be used to check if dam got a title, if not, the caption from the media element can be used and so on.
Updated by Felix Nagel over 1 year ago
Good point. Perhaps it would be suitable to provide a nice DAM aware template so it works out-of-the-box.
Updated by Felix Nagel over 1 year ago
I tried to implement a DAM partial template which works with every available input and noticed the following: dam field title is always empty. It seems because media relation data and DAM file data are merged. This should be fixed.