Multilang Sites: Change order and visibility of each site via panel

Hey guys!

I am trying to display a custom menu for both german and french. Depending on which sites have already been translated.

Has anyone experienced what’d be the best way to change visibility and order of each page and language via panel? Right now I am doing this by checking if FR is set then display all visible pages in the menu bar, which works well. It would be nicer though to be able to change it through the panel.

<?php if($site->language()->code() == 'fr'): ?>
<?php foreach($pages->visible() as $p): ?>
                <li class="sub" >
                    <a <?php e($p->isOpen(), ' class="active"') ?> href="<?php echo $p->url() ?>"><?php echo $p->title()->html() ?></a>
                </li>
            <?php endforeach ?>
     <?php endif ?>

Thanks!

This is a nice plugin you can use to determine status of translations: https://github.com/flokosiol/kirby-translations

You can then use it to filter your pages.

Then there is the sortable field: https://github.com/lukaskleinschmidt/kirby-sortable, which might be helpful with creating sort orders of pages (but I’m not really sure)

But I’m pretty sure you could use the relationship field to create a sortable menu in combination with the translations plugin.

1 Like