NGSTACK-921 enhanced link download support#262
Conversation
… new templates for it to support 'download_link' target on enhancedlink field
…wo new templates for it to support 'download_inline' target on enhancedlink field
| @@ -1,4 +1,4 @@ | |||
| {# content \Netgen\IbexaSiteApi\API\Values\Content #} | |||
| {# content \Ibexa\Contracts\Core\Repository\Values\Content\Content #} | |||
There was a problem hiding this comment.
Are you sure this change is correct? We don't work with Ibexa Content.
| {# content \Netgen\IbexaSiteApi\API\Values\Content #} | ||
| {# location \Netgen\IbexaSiteApi\API\Values\Location #} | ||
|
|
||
| {% set ezBinaryFileField = null %} |
There was a problem hiding this comment.
Twig variables should be snake_case.
| template: "@ibexadesign/content/views/download_inline/ezbinaryfile_common.html.twig" | ||
| match: | ||
| Identifier\ContentType: | ||
| - ng_video |
There was a problem hiding this comment.
Why do we want downloadable ng_video?
There was a problem hiding this comment.
I can't come up with a specific use case, but I added ng_video because both file and ng_video content types have field of type ezbinaryfile.
| template: "@ibexadesign/content/views/link_embed.html.twig" | ||
| match: ~ | ||
| download_inline: | ||
| ezbinaryfile_common: |
There was a problem hiding this comment.
We can just name this common. No need for ezbinaryfile_ prefix. Same goes for template file names.
There was a problem hiding this comment.
a77e69a
Renamed ezbinaryfile_common.html.twig templates to just be common.html.twig. Updated the content_view.yaml file to reflect this change as well
…mmon.html.twig for download_link and download_inline
…tml.twig template
5a410b5 to
30358e1
Compare
Added configuration for
download_linkanddownload_inlinetarget types tocontent_view.yamlfile.Added templates for them under
themes/app/content/viewsfolder. Theezbinaryfile_common.html.twigtemplate will be rendered when contentTypeIdentifier is either ng_video or file, and for everything else, adownload_inline.html.twigordownload_link.html.twigwill be rendered, depending on if the target type is 'download_inline' or 'download_link'.This PR is related to another PR opened for ibexa-fieldtype-enhanced-link bundle: netgen/ibexa-fieldtype-enhanced-link#32