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
<nav class="languages" role="navigation'"> | |
<?php foreach($site->languages() as $language): ?> | |
<?php $inventory = $page->inventory(); | |
if (array_key_exists($language->code(),$inventory['content'])) :?> | |
<?php if(($site->language() !== $language)): ?> | |
<span> | |
<a href="<?php echo $page->url($language->code()) ?>"><?php echo $language->code(); ?></a> | |
</span> | |
<?php endif ?> | |
<?php endif ?> |
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
Title: Title of Video | |
---- | |
Description: Description of video | |
---- | |
Duration: length in minutes | |
---- | |
Thumb: url/to/thumb/filename |
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
<?php | |
// store the content of the kirbytext text variable in $text | |
$text = kirbytext($page->text()); | |
// split the content of $text whenever a <!--pagebreak--> code is encountered and store in the array $pages | |
$pages = explode('<!--pagebreak-->', $text); | |
// count the number of pages in the array | |
$pageCount = count ($pages); |
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
<nav class=lang_toggle> | |
<?php | |
$langs=c::get('lang.available'); | |
$current=c::get('lang.current'); | |
foreach($langs as $lang): | |
?> | |
<span> | |
<a href="<?php echo $page->url($lang)?>"> | |
// show language names in the language of the respective languages; | |
// change second $lang to $current if you want all language names to show in the current language |
NewerOlder