Copy link to clipboard
Copied
and so forth in an infinite nesting...
with dw CC 2018
You can Save PHP files as Templates.
Go to File > New > PHP file. Hit Create button.
Insert your include statement.
SaveAs Template and give it the 2nd extension as follows.
mainTemplate.php.dwt
Copy link to clipboard
Copied
If you wish to live dangerously, have a look at Creating a nested template in Dreamweaver
If you wish to have an easy life, have a look at Alt-Web Design & Publishing: Server-Side Includes with PHP , with thanks to Nancy
Copy link to clipboard
Copied
Nesting Templates is a bad idea. Just because you can do it, doesn't mean you should. If you tell us what you're trying to do and why you think nesting templates would help you, maybe we can offer better options.
Copy link to clipboard
Copied
Thanks Nancy & Ben. I'll tell you more a bit later.
Copy link to clipboard
Copied
It works perfectly fast and simply with PHP. For examples in my site: <?php require_once('includes/creativePouhons.html'); ?>
But, as I have the same menu for all pages based on the main template, I would like <?php require_once('includes/menu.html'); ?> in place of repeating the code of this menu:
-------------------------------------------------------------------
<ul>
<li>
<li>
<a href="/">Home</a>
</li>
<li>
<a href="/creative.php">Creative</a>
</li>
<li>
<a href="/professional.php">Professional</a>
</li>
<li>
<a href="/HealthSport.php">Health and Sport</a>
</li>
<li>
<a href="/Misceallenous.php">Misceallenous</a>
</li>
<li>
<a href="/about.html">About Me</a>
</li>
<li>
<a href="/contact.html">Contact</a>
</li>
</li>
</ul>
-----------------------------------------------------------------------
for <div class="menu full">,
for <div class="menu dropdown">,
for <footer class="container">
<div class="sixteen columns">
<nav role="navigation">
As much the include works fine for a. php file as it is rejected and considered an error by a .dwt file. And if I change the .dwt extension to .php, the file loses its template function, I guess.
Could you help me a little bit more?
Copy link to clipboard
Copied
You can Save PHP files as Templates.
Go to File > New > PHP file. Hit Create button.
Insert your include statement.
SaveAs Template and give it the 2nd extension as follows.
mainTemplate.php.dwt
Copy link to clipboard
Copied
If Nancy's answer does not work, try mainTemplate.dwt.php​, it is what works for me
Copy link to clipboard
Copied
Merci Ben, j'essaye cela tout de suite car j'ai en effet rencontré des problèmes. En tous cas, vous m'avez tous appris des choses comme un peu de PHP, à quoi ça sert...
Copy link to clipboard
Copied
C'était bien ça. Cela fonctionne parfaitement avec dwt.php
Copy link to clipboard
Copied
I now look forward to
For me, it means having a Cognac and a cigar at 4 in the morning. Good luck.
Copy link to clipboard
Copied
Oui, j'ai regardé les matches avec les "Diables" à partir du moment où ils se sont imposés contre l'Angleterre.