Hi, my names Steve. I am new here, so if I am posting in the wrong section please forgive me and let me know!

I use a CMS called SilverStipe - http://www.silverstripe.org/ - and I think it's great. You should check it out, especially the new version 3 beta! Looks great!

However, it uses it's own templating language and file extension which is .ss . The theme I am using at the moment (Solarized) doesn't do a very good job so I wanted to created whatever is needed to get it right. It will be very similar to how PHP is in HTML so I don't think it will be very difficult.

Could someone help me with what I will need to do to do this for happen?

I have started to create one but I'm not worrying about the patterns and snippets yet. Just wanted it to look the same as HTML to start with (including colour of the tags etc) so made a real simple one. Below is the JSON and the buiult XML tmLanguage code for what I have so far:

You haven't defined any scopes of value. "text.html" is like a last-resort scope, and most schemes probably won't define it (except to define "text" or "source"). A better way would be to include the HTML syntax:

I've copied your code into my file and it doesn't work. Also added it the the JSON and re built it but that didn't work. I've been following what is in the docs:

Select Json to tmLanguage in Tools | Build SystemPress F7A .tmLanguage file will be generated for you in the same folder as your .JSON-tmLanguage fileRestart Sublime Text so all your changes can take effect

Also, what you suggested goes against what the TextMate docs seem to be saying:

But if you are specializing an existing type, you probably want to derive the name from the type you are specializing. For example Markdown is text.html.markdown and Ruby on Rails (rhtml files) is text.html.rails.

In the code I provided, change "text.html" to "text.html.basic" . My mistake.

The include key is documented better on the Textmate resouce. Basically it allows you to pull in another syntax, items from the repository of the current syntax, or the entire current syntax itself. It's really powerful.

As to scope naming, if you look in the default HTML.tmLanguage file, you'll see that php is included as "source.php" . That is pulling in the full PHP language, so it's a bit different than SS's templating language. I assumed that it was possible to insert arbitrary PHP alongside the SS template, which may not be correct. In any case, I think you'll be fine naming the scope either "text.html.ss" or "source.ss" . I do think my previous post's latter suggestion is the way to go though, since this we're dealing with an HTML file with embedded PHP, not the other way around.*

* Okay, it actually is the other way around since it will be handled server side by PHP. But it LOOKS like an HTML file for the most part, so I think it's easier to treat it as such.

For those stumbling in from Google, I've created a ST2 package for SilverStripe templates, with syntax highlighting and snippets. Install via Package Control or via the github repo: http://bit.ly/UueqnL