-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BUGFIX] Fix contentAs feature when used on Layout level
`<f:render section="MySection" contentAs="content">some content</f:section>` did not work when called from a Layout because the `contentAs` variable was not passed to the template section in that case.
- Loading branch information
1 parent
2d2d5db
commit 68db27f
Showing
6 changed files
with
48 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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,3 @@ | ||
<f:layout name="ContentAs" /> | ||
|
||
<f:render section="Main" contentAs="content">Content from layout via contentAs</f:section> |
This file contains 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,5 @@ | ||
<f:layout name="ContentAs" /> | ||
|
||
<f:section name="Main"> | ||
{content} | ||
</f:section> |
This file contains 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,26 @@ | ||
<?php | ||
|
||
/* | ||
* EXAMPLE: MVC pattern used with TYPO3.Fluid | ||
* | ||
* This examples shows how TYPO3.Fluid is integrated | ||
* in an MVC context, highlighting which parts may | ||
* be replaced in order to adapt the engine to your | ||
* favorite MVC framework. | ||
* | ||
* The alternative to this is single file rendering | ||
* - see the other example for that. | ||
*/ | ||
|
||
require __DIR__ . '/include/view_init.php'; | ||
|
||
// Assign Layout name as ViewVariable which we will pass to f:layout as name | ||
$view->assign('layout', 'Dynamic'); | ||
|
||
// Set the template path and filename we will render | ||
$view->getTemplatePaths()->setTemplatePathAndFilename(__DIR__ . '/Resources/Private/Singles/ContentFromLayout.html'); | ||
|
||
$output = $view->render(); | ||
|
||
// Output of Controller "Default" action "Default" using helper from view_init.php | ||
example_output($output); |
This file contains 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 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 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