Hi, to avoid correcting the same html code in all templates, I wrote it in a separate .php file and then linked from the html page through the following code:
<?php wireIncludeFile('styles/menu-A.php'); ?>
But now I would like in the template to be able to choose whether to put the type A menu on the page, or the type B menu.
I used the following code, but it does not work:
<?php wireIncludeFile('<?=$page->type_menu?>'); ?>
The code <?=$page->type_menu?> is supposed to call a processwire field, but it doesn't work and processwire goes crazy, sending me a serious error message. Where do I go wrong?