Any way for a server-side include to get the file name or URL of the file where it is being included
- by mikez302
Is there any way for a server-side include to determine what file it is being included in? I would like to do something like this:
<ul id="menu">
<!--#if expr="$URL = index.html" -->
<li><span>Home</span></li>
<!--#else -->
<li><a href="index.html">Home</a></li>
<!--#endif -->
<!--#if expr="$URL = about.html" -->
<li><span>About us</span></li>
<!--#else -->
<li><a href="about.html">About us</a></li>
<!--#endif -->
<!--#if expr="$URL = contact.html" -->
<li><span>Contact us</span></li>
<!--#else -->
<li><a href="contact.html">Contact us</a></li>
<!--#endif -->
</ul>
I just need to know if it is possible using server-side includes, and if so, what the syntax would be.