Copy link to clipboard
Copied
Im trying to insert a server side include into Dreamweaver CC without success. Is this feature working or not? I do have an option to insert a server side include but when trying to add it to my page is not working. Any suggestions?
Copy link to clipboard
Copied
Depending on the type of include you're using, your pages that the includes are being written into will need to have the correct file extension (.php or .shtml for example), do they?
Do you have a local testing server installed and is it running?
Have you defined a site in DW?
Copy link to clipboard
Copied
-I do had the defined site in place already.
-My entire website extension is .html
-What do you mean .shtml extension? Do I just save the content that I want in the server side with the .shtml extension?
- I do not have a local testing as I am able to upload the page in a testing server and see if the SS is running or not.
- I tried installing the server side behaviors through the extensions but these do not work with dreamweaver 2017.
I can't believe that Dreamweaver remove this feature! I have a huge website that I am still managing with Expression Web just because I have many server side includes in place and cannot migrate it to Dreamweaver because I am afraid that the server sides will not work.
Your help is greatly appreciated.
Thanks!
Copy link to clipboard
Copied
If you are using PHP includes, the file must have a .php extension in order for the includes to function correctly...
Creating a website using PHP Includes
SSI includes will use the .shtml extension and re written slightly differently...
To get the most out of DW while developing sites with server side includes, you'll want to get a local testing server installed. I personally use XAMPP from here:
XAMPP Installers and Downloads for Apache Friends
This is how you set it up to work with DW:
How to set up a testing server in Dreamweaver
The old server behaviors extension is pretty much garbage at this point. The behaviors use code that is extremely outdated and will not function if your server has PHP7 or later installed. Rather than updating the behaviors, Adobe relies on third party developers to carry those behaviors forward. DMXZone is one company that creates an updated version of those behaviors, if you have a budget to pay for the extension.
I've never touched Expression Web and know nothing about the code produced there or whether it will function when pulled into a DW site. One of the other contributors here should have a better idea about that.
Copy link to clipboard
Copied
Jon. Thank you so much for your answer. I got it working THANK YOU!
Now the the problem I have is that the main file where the server side include is added needs to be saved with an .shtml extension. This website is already indexed in Google and I would not want to change all these files to a .shtml as I will lose my rankings etc.
Is there a code that I can add to the .htaccess file so that I can keep the files with .html extensions as is and be able to add the server sides?
Your assistance is greatly appreciated.
Regards,
Irmarie
Copy link to clipboard
Copied
You should talk to your hosting company to make sure it's OK for you to force the server to parse .html as .shtml, but it should be technically doable.
I've personally never done it before, so I have no personal experience or warnings I can offer. A quick Google search gave this as one of the first options:
Copy link to clipboard
Copied
Jon thanks for your reply. I was able to manage this issue by adding a code into the .htaccess file. All is working well.
Have a nice day!