Highlighted

Code colour server side includes (ssi)

Explorer ,
Oct 23, 2017

Copy link to clipboard

Copied

Is it possible to code colour server side includes (ssi)?

Er... that's it.

Win7 DW CC 2017

Adobe Community Professional
Correct answer by Jon Fritz II | Adobe Community Professional

What file extension are you using for the include file?

The extension .ssi isn't recognized by DW and will be white on black or black on white depending on your theme.

Changing the extension of the include to something DW recognizes will bring back code coloring (html,  shtml or php).

Views

190

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Code colour server side includes (ssi)

Explorer ,
Oct 23, 2017

Copy link to clipboard

Copied

Is it possible to code colour server side includes (ssi)?

Er... that's it.

Win7 DW CC 2017

Adobe Community Professional
Correct answer by Jon Fritz II | Adobe Community Professional

What file extension are you using for the include file?

The extension .ssi isn't recognized by DW and will be white on black or black on white depending on your theme.

Changing the extension of the include to something DW recognizes will bring back code coloring (html,  shtml or php).

Views

191

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Oct 23, 2017 0
Adobe Community Professional ,
Oct 23, 2017

Copy link to clipboard

Copied

They'll pick up whatever color is set for html comments as far as I've been able to tell in CC2017 and later. I don't know of a code-mirror selector that can change them specifically, but you can change the color of html comments within DWs main.less file though (which may be enough for you if you don't use a lot of html comments in your code).

1. Go to Edit > Preferences > Interface

2. Pick your Code Theme
3. Hit the + icon to duplicate it

4. Give the new theme a name and hit OK

5. Click the new theme in the list and hit the Edit button

6. Do a quick Find for "cm-comment"

7. Change the hex color for the comment and save

8. Go back to Edit > Preferences > Interface select your new theme and hit Apply

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 23, 2017 0
Adobe Community Professional ,
Oct 23, 2017

Copy link to clipboard

Copied

I think it depends on which Code Color Theme you use.  In mine, PHP includes are pink and orange.

Nancy O'Shea, ACP
Alt-Web Design & Publishing

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 23, 2017 0
Adobe Community Professional ,
Oct 23, 2017

Copy link to clipboard

Copied

Ah, yeah, I guess when the OP said "server side includes (ssi)", I assumed they were talking about shtml includes like...

<!--#include virtual="/cgi-bin/counter.pl" -->

Which get picked up as comments.

PHP includes are controlled, at least in the theme I'm currently using, with the "cm-meta, .cm-m-clike.cm-meta" selectors.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 23, 2017 0
Explorer ,
Oct 24, 2017

Copy link to clipboard

Copied

Thanks for responding.

Obviously I didn't think through my question thoroughly though.

What I mean is the html code in the ssi file itself. The ssi file, despite being just an html snippet, is displayed as white on black (in my particular theme) whereas a file ending html or shtml enjoys full colour niceness.

And not the include link to it which in my shtml file is just follows the commented out colour as normal.

e.g. <!--#include virtual="/includes/head.ssi" -->

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 24, 2017 0
Adobe Community Professional ,
Oct 24, 2017

Copy link to clipboard

Copied

What file extension are you using for the include file?

The extension .ssi isn't recognized by DW and will be white on black or black on white depending on your theme.

Changing the extension of the include to something DW recognizes will bring back code coloring (html,  shtml or php).

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 24, 2017 0
Explorer ,
Oct 24, 2017

Copy link to clipboard

Copied

Aha! I never realised you could use different extension names with an include, so since... erm... a long time ago, I've always used .ssi That's the way I was taught.

A quick test to rename it an html file has done the trick.

Simple really. Many thanks for your help everyone.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 24, 2017 0