-
Notifications
You must be signed in to change notification settings - Fork 82
IBX-9813: Cacheable request query parameters #3033
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
Open
adriendupuis
wants to merge
22
commits into
5.0
Choose a base branch
from
cacheable-query-params
base: 5.0
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
c58dab5
About `cacheable_query_params`
adriendupuis d921f92
About `cacheable_query_params`
adriendupuis d31ea55
mkdocs.yml + page_twig_functions.md
adriendupuis a5a41fa
Update docs/content_management/field_types/field_type_reference/pagef…
adriendupuis f3bffe1
Merge branch 'cacheable-query-params' into page-twig-functions
adriendupuis c87e743
page_blocks.md: nobr in table
adriendupuis 393f848
pagefield.md: Move example to file
adriendupuis ed2dd9b
pagefield.md: emphase on ibexa_append_cacheable_query_params optionality
adriendupuis afb4bf5
pagefield.md: emphase on ibexa_append_cacheable_query_params optionality
adriendupuis aaf1d09
data-ez-block-id -> data-ibexa-block-id
adriendupuis 11768ad
page_twig_functions.md
adriendupuis 8ae06dc
Merge branch '5.0' into cacheable-query-params
adriendupuis 43cdb7f
Merge branch 'page-twig-functions' into cacheable-query-params
adriendupuis 86cd14c
pagefield.md: Link to page_twig_functions.md
adriendupuis 38085c2
pagefield.md: typo
adriendupuis 4a07410
Apply suggestions from code review
adriendupuis 190f9c5
pagefield.md: Fix style and syntax
adriendupuis 4430edc
page_blocks.md: rewording
adriendupuis 44d42b2
page_blocks.md: rewording+link
adriendupuis 3481d79
Update docs/content_management/field_types/field_type_reference/pagef…
adriendupuis b76ddba
pagefield.md: Rewording
adriendupuis d03849f
Merge branch '5.0' into cacheable-query-params
adriendupuis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| <div> | ||
| {# The required attribute for the displayed zone #} | ||
| <div data-ibexa-zone-id="{{ zones[0].id }}"> | ||
| {# If a zone with [0] index contains any blocks #} | ||
| {% if zones[0].blocks %} | ||
| {# for each block #} | ||
| {% for block in blocks %} | ||
| {# create a new layer with appropriate ID #} | ||
| <div class="landing-page__block block_{{ block.type }}" data-ibexa-block-id="{{ block.id }}"> | ||
| {# render the block by using the "Ibexa\\Bundle\\FieldTypePage\\Controller\\BlockController::renderAction" controller #} | ||
| {# location.id is the ID of the Location of the current content item, block.id is the ID of the current block #} | ||
| {{ render_esi(controller('Ibexa\\Bundle\\FieldTypePage\\Controller\\BlockController::renderAction', { | ||
| 'locationId': locationId, | ||
| 'blockId': block.id, | ||
| 'versionNo': versionInfo.versionNo, | ||
| 'languageCode': field.languageCode | ||
| }, ibexa_append_cacheable_query_params(block))) }} | ||
| </div> | ||
| {% endfor %} | ||
| {% endif %} | ||
| </div> | ||
| </div> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
docs/templating/twig_function_reference/page_twig_functions.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| --- | ||
| description: Page field and page block Twig functions provide access to configuration. | ||
| page_type: reference | ||
| edition: experience | ||
| month_change: true | ||
| --- | ||
|
|
||
| # Page Twig functions | ||
|
|
||
| ## `ibexa_append_cacheable_query_params()` | ||
|
|
||
| Get the query parameters of a page block as [configured in `cacheable_query_params`](page_blocks.md#block-configuration). | ||
| If the block type has no configured query parameters, an empty array is returned. | ||
|
|
||
| ```twig | ||
| {{ render_esi(controller('Ibexa\\Bundle\\FieldTypePage\\Controller\\BlockController::renderAction', { | ||
| 'locationId': locationId, | ||
| 'blockId': block.id, | ||
| 'versionNo': versionInfo.versionNo, | ||
| 'languageCode': field.languageCode | ||
| }, ibexa_append_cacheable_query_params(block))) }} | ||
| ``` | ||
|
|
||
| ## `ibexa_page_layout()` | ||
|
|
||
| Get the layout template of a landing page. | ||
|
|
||
| ```twig | ||
| {% include ibexa_page_layout(page) with {'zones': page.zones} %} | ||
| ``` | ||
|
|
||
| It can be used to render a [page field](pagefield.md). | ||
| For an example, you can look at how the default `vendor/ibexa/fieldtype-page/src/bundle/Resources/views/fields/ibexa_landing_page.html.twig` uses it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.