I'm trying to create a small (but hopefully, growing) website, and I want to include a sidebar that will lead to different sections of the site. It seems like the easiest way to do this, and keep the site manageable as it grows, is to maintain a separate file for the sidebar, and include it on each page with a scripting language like PHP or Javascript. That way, as the site grows, and new sections are added, I will only have to change a single file to update the sidebar on all pages at the same time.
However, Altrea wrote in a pinned thread:
You are trying to use php code in html files.
This will not work because by configuration Apache will not send html files through the php interpreter.
I note that the same rule applies to Javascript. Now, I understand the reasoning behind this decision, but it seems that without the use of a scripting language, it would be nearly impossible to create a dynamic web page, unless I'm missing something. Is there a better tool for creating dynamic content? If so, could someone please give me a pointer in the right direction? And if not, how do other sites include dynamic content? Any help would be appreciated.
-Chris Adams