Include template into template

hello,

how can include a template into a template?

greetings perry

Why do you want to include a template within a template? You can include snippets:

<?php snippet('my snippet') ?>

try to change the template from the panel

  <?php $template = $page->vorlage()->kirbytext();  

  echo $template;

  if ($template == 'vorlage_a')
  
    {
      include('templat_a')

    }

  else
    {
      ......
    }

  ?>

What I would do: Use one template with just a header and footer, and then include a different snippet depending on page settings. Or if the header and footer need to be different as well, call all snippets depending on that condition.

Okay thank’s


select,blueprint

How can set a pre-select option?

  vorlage:
    label: Template
    type: select
    options: 
      template_a: 
        fr: template_a
        de: template_a
      template_b: 
        fr: template_b
        de: template_b

use default:

vorlage:
  label: Template
  type: select
  default: template_a
  options: 
    ....

thank you texnixe