-
Notifications
You must be signed in to change notification settings - Fork 10
NGSTACK-921 enhanced link download support #262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure this change is correct? We don't work with Ibexa Content.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
30358e1
My bad, reverted the change here
{# content \Netgen\IbexaSiteApi\API\Values\Content #} | ||
{# location \Netgen\IbexaSiteApi\API\Values\Location #} | ||
|
||
{% set ezBinaryFileField = null %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Twig variables should be snake_case
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dd4ee2b
Changed variable names to 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we want downloadable ng_video
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pspanja WDYT?
template: "@ibexadesign/content/views/link_embed.html.twig" | ||
match: ~ | ||
download_inline: | ||
ezbinaryfile_common: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can just name this common
. No need for ezbinaryfile_
prefix. Same goes for template file names.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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_link
anddownload_inline
target types tocontent_view.yaml
file.Added templates for them under
themes/app/content/views
folder. Theezbinaryfile_common.html.twig
template will be rendered when contentTypeIdentifier is either ng_video or file, and for everything else, adownload_inline.html.twig
ordownload_link.html.twig
will 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