3 ms·
Speaking of, is there a way to import the navigation menu into an xhtml page without php or somesuch? Both "link" and @import are only valid within the header,
by Alex3917 18y ago
Speaking of, is there a way to import the navigation menu into an xhtml page without php or somesuch? Both "link" and @import are only valid within the header, so they are no good for importing data into the body of the page.
- halo 18y agoYou could do it via JavaScript or iframes, but it's generally a bad idea. Server-side scripting languages like PHP or even server-side includes exist for a reason and fulfil this exact need transparently from the user and there's no good reason to shy away from it.
- Alex3917 18y agoFair enough. I was having trouble getting PHP working the other day on my web server, so I guess I need to call my hosting company and ask what's up.
- erlanger 18y agoYes, if you're serving from Apache: * http://httpd.apache.org/docs/2.0/howto/ssi.html http://httpd.apache.org/docs/2.0/howto/ssi.html * http://httpd.apache.org/docs/2.0/mod/mod_include.html http://httpd.apache.org/docs/2.0/mod/mod_include.html I'm sure other servers have similar options.
- eworoshow 18y agoNginx also supports server-side includes: http://wiki.nginx.org/NginxHttpSsiModule http://wiki.nginx.org/NginxHttpSsiModule
- tsally 18y agoIf you do this, be aware of the security risks associated with SSI. Read the relevant part of: http://www.w3.org/Security/Faq/wwwsf3.html http://www.w3.org/Security/Faq/wwwsf3.html