ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Can I save templates as files without the php extension?

August 06, 2007 1:55pm

Subscribe [5]
  • #1 / Aug 06, 2007 1:55pm

    atealtha

    21 posts

    I’m currently using the templates’ “Save as file” feature to work with my favorite editor. But since everything is saved as a .php file, javascript and css templates do not have syntax highlighting.

    Is there a way to take out the .php and still have it work?

  • #2 / Aug 06, 2007 3:01pm

    No, but depending on the editor, you should be able to define extensions for syntax highlighting recognition. Something like .js.php for javascript highlighting.

  • #3 / Aug 06, 2007 4:05pm

    JT Thompson

    745 posts

    You might find it easier to just copy the text from the template editor and paste it into your favorite editor for work. That’s how I do it. Exporting the template to do it just adds another step really.

  • #4 / Aug 06, 2007 4:08pm

    elemental

    77 posts

    What editor are you using?

    If on mac and using TextMate see this thread how to have correct syntax highlighting see this thread.

  • #5 / Aug 06, 2007 4:09pm

    It’s actually fewer steps for me, since I use Coda (though the same can be said of the Textmate/Transmit/CSSedit combo others prefer), I edit directly from the templates directory. I very rarely visit the templates page of the control panel, and with instant preview within Coda, I barely need to have my web browser open at all.

  • #6 / Aug 06, 2007 4:14pm

    atealtha

    21 posts

    I use vim. I already added the commands to my ~/.vimrc file to treat those file extensions correctly.

    Thanks for the advice.

  • #7 / Aug 06, 2007 4:21pm

    JT Thompson

    745 posts

    bah! all you mac people confuse me! 😊

  • #8 / Aug 06, 2007 4:32pm

    vim’s a unix thing, but I can see how the two might be confused. ;P

  • #9 / Aug 06, 2007 4:36pm

    Ingmar

    29245 posts

    There’s vim for all platforms, I think. Slightly hardcore, though 😊

  • #10 / Aug 06, 2007 4:42pm

    JT Thompson

    745 posts

    Actually I was referring to coda and textmate. I use vim on my linux servers and the linux workstation i have here. Though on linux I prefer midnight commander.

  • #11 / Aug 06, 2007 5:07pm

    Coda and Textmate are, as the kids say, ‘teh awesome.’

    ;P

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases