Created
October 18, 2015 12:16
-
-
Save veryrobert/b0dae664bfe0e6dacf01 to your computer and use it in GitHub Desktop.
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
| // Using Kirby structure field with a selection field inside for images | |
| <?php foreach($page->structureName()->yaml() as $name) { | |
| $title = $name['fieldNameText']; | |
| $image = $name['fieldNameImage']; | |
| $imageUrl = $page->file($image)->url(); | |
| echo html('<h1>'.$title.'</h1><img src="'.$imageUrl.'" alt="'.$title.'">'); | |
| } | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Using Kirby structure field with a selection field inside for images