1

The documentation in simplesamlphp for making themes is pretty non-existent, and though it says that it supports Twig now, I can not get it to work. I have in my theme (modules/mymodule/themes/fancytheme/default/):

includes/footer.php
includes/header.php
base.twig
_footer.twig
_header.twig
index.twig

From the documentation (https://simplesamlphp.org/docs/development/simplesamlphp-theming) it explains about the new Twig templates, but there is nothing about how to move to Twig templates, just to copy the twig files across.

The theme I created is working, as if I change the php files in includes, I can see the changes come through. I'm just not sure how to use the Twig files.

MicWit
  • 655
  • 12
  • 31
  • Did you read [this wiki page](https://github.com/simplesamlphp/simplesamlphp/wiki/Twig:-Migrating-templates), linked in section `5 Migrating to Twig templates` from the page you mentioned in the question? – Nima Sep 05 '18 at 07:06
  • I did, that is more about migrating code from the current system to TWIG, but not how to change over to the Twig system. I need to know how to get the twig files in the template to be read over the php files. – MicWit Sep 05 '18 at 07:41
  • What version of SSP are you using? You linked to the development version of the documentation. – Patrick Sep 06 '18 at 22:40
  • I was using 1.15.4, since then 1.16 has been released and I have an instance of it up just to test templates, but same result. I linked the development version as it was the only one to mention TWIG (was not in the 1.15 documentation), it is now in stable. I also have left messages at https://groups.google.com/forum/#!topic/simplesamlphp/M6yA2R6snmk with some more details, but no responses. – MicWit Sep 07 '18 at 04:03

1 Answers1

0

I found how to enable the twig templates in SimpleSAMLphp.

I first renamed the 2 php templates to something without the php extension.

includes/footer.php
includes/header.php

Then in config.php, I added the following line within the $config = []

'usenewui' => true,
Suraj Rao
  • 29,388
  • 11
  • 94
  • 103
Jonasdk
  • 151
  • 7