Skip to content

IBX-3035 [Twig] Allowed passing parameters to ibexa render function#674

Open
vidarl wants to merge 16 commits into4.6from
IBX-3035_As_a_developer_I_want_to_pass_extra_atrributes_when_using_ibexa_render_Twig_function
Open

IBX-3035 [Twig] Allowed passing parameters to ibexa render function#674
vidarl wants to merge 16 commits into4.6from
IBX-3035_As_a_developer_I_want_to_pass_extra_atrributes_when_using_ibexa_render_Twig_function

Conversation

@vidarl
Copy link
Contributor

@vidarl vidarl commented Nov 3, 2025

🎫 Issue IBX-3035

Description:

When using render(controller('ibexa_content::viewAction')), you can send parameters to the controller which will be available in the template.

Example:

    <h2>render controller</h2>
    {{ render(controller('ibexa_content::viewAction', {
        'contentId': content.id,
        'viewType': 'line',
        'params':
            { 'my_param': 'custom_data', }
    })) }}

    <h2>render_esi controller</h2>
    {{ render_esi(controller('ibexa_content::viewAction', {
        'contentId': content.id,
        'viewType': 'line',
        'params':
            { 'my_param': 'custom_data', }
    })) }}

This PR adds the same possibility when using ibexa_render() :

    <h2>direct</h2>
    {{ ibexa_render(content,
        {
            'viewType': 'line',
            'method': 'direct',
            'params': {
                'my_param': 'custom_data'
            }
        })
    }} <br/>

    {{ ibexa_render(location,
        {
            'viewType': 'line',
            'method': 'direct',
            'params': {
            'my_param': 'custom_data'
        }
        })
    }} <br/>

    <h2>inline</h2>
    {{ ibexa_render(content,
        {
            'viewType': 'line',
            'method': 'inline',
            'params': {
                'my_param': 'custom_data'
            }
        })
    }} <br/>

    {{ ibexa_render(location,
        {
            'viewType': 'line',
            'method': 'inline',
            'params': {
                'my_param': 'custom_data'
            }
        })
    }} <br/>


    <h2>esi</h2>
    {{ ibexa_render(content,
        {
            'viewType': 'line',
            'method': 'esi',
            'params': {
                'my_param': 'custom_data'
            }
        })
    }} <br/>

    {{ ibexa_render(location,
        {
            'viewType': 'line',
            'method': 'esi',
            'params': {
                'my_param': 'custom_data'
            }
        })
    }} <br/>

For QA:

Documentation:

@mnocon mnocon added the Doc needed The changes require some documentation label Nov 4, 2025
@vidarl vidarl force-pushed the IBX-3035_As_a_developer_I_want_to_pass_extra_atrributes_when_using_ibexa_render_Twig_function branch 3 times, most recently from 1bb7be8 to 2a1ab1c Compare November 4, 2025 15:06
@alongosz alongosz changed the title IBX-3035 as a developer i want to pass extra atrributes when using ibexa render_twig() function IBX-3035: [Twig] Allowed passing parameters to ibexa render function Nov 5, 2025
@vidarl vidarl force-pushed the IBX-3035_As_a_developer_I_want_to_pass_extra_atrributes_when_using_ibexa_render_Twig_function branch 2 times, most recently from 099a520 to a0ddb17 Compare December 1, 2025 14:55
@vidarl vidarl requested a review from alongosz December 2, 2025 08:07
@vidarl vidarl force-pushed the IBX-3035_As_a_developer_I_want_to_pass_extra_atrributes_when_using_ibexa_render_Twig_function branch from a0ddb17 to 988d77f Compare December 2, 2025 08:10
@ibexa-yuna ibexa-yuna changed the title IBX-3035: [Twig] Allowed passing parameters to ibexa render function IBX-3035 [Twig] Allowed passing parameters to ibexa render function Dec 16, 2025
@konradoboza
Copy link
Contributor

@vidarl please make sure all the suggestions are adressed, CI lits green and the PR is rebased.

@vidarl vidarl force-pushed the IBX-3035_As_a_developer_I_want_to_pass_extra_atrributes_when_using_ibexa_render_Twig_function branch from 3c65ba0 to 5e212bb Compare December 16, 2025 13:24
@vidarl vidarl force-pushed the IBX-3035_As_a_developer_I_want_to_pass_extra_atrributes_when_using_ibexa_render_Twig_function branch from 266a88e to 00e2b90 Compare January 13, 2026 13:31
@vidarl
Copy link
Contributor Author

vidarl commented Jan 14, 2026

@vidarl please make sure all the suggestions are adressed, CI lits green and the PR is rebased.

@konradoboza, @alongosz , @mikadamczyk : This is now done

Copy link
Contributor

@konradoboza konradoboza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few more minor things:

@tomaszszopinski tomaszszopinski force-pushed the IBX-3035_As_a_developer_I_want_to_pass_extra_atrributes_when_using_ibexa_render_Twig_function branch from ee6e060 to dc13138 Compare February 3, 2026 10:51
@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 3, 2026

@tomaszszopinski
Copy link

🟢 ibexa/experience#573

Copy link

@tomaszszopinski tomaszszopinski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QA approved on Ibexa DXP 4.6 commerce.

@mnocon mnocon removed the Doc needed The changes require some documentation label Feb 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants