Skip to content

Instantly share code, notes, and snippets.

@bastianallgeier
Last active September 17, 2015 02:25
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bastianallgeier/b7187bcb42394d115154 to your computer and use it in GitHub Desktop.
Save bastianallgeier/b7187bcb42394d115154 to your computer and use it in GitHub Desktop.
In Kirby's multi-lang version it is super easy to fetch content from different languages in a template.
<?php snippet('header') ?>
<h2>English Version</h2>
<h3><?php echo $page->content('en')->title()->html() ?></h3>
<?php echo $page->content('en')->text()->kirbytext() ?>
<h2>German Version</h2>
<h3><?php echo $page->content('de')->title()->html() ?></h3>
<?php echo $page->content('de')->text()->kirbytext() ?>
<?php snippet('footer') ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment