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.

how to format code

December 09, 2010 5:35am

Subscribe [2]
  • #1 / Dec 09, 2010 5:35am

    Thomas Hartmann

    170 posts

    I work now since some months with EE and I am really happy 😊

    Something I dont like is the code editor, my code is not well formated.
    Often I copy the code in Eclipse, format it and copy it back to EE 😊

    Is there already en extension for the editor?
    Or what is your approach on that?

    Thx for your input!

    Best, Thomas

  • #2 / Dec 09, 2010 4:36pm

    Ingmar

    29245 posts

    I’m not sure I follow. Are you talking about the template editor? How is it not “well formatted”?

  • #3 / Dec 13, 2010 7:33am

    Thomas Hartmann

    170 posts

    yes, I am talking about the template editor…

    I see that every template is also saved as a .html file in system/expressionengine/templates/...

    The problem is: If I code directly in this file, and afterwards open the template editor, it’s not the same version. This is only one way—> if you save a template over template editor, it will write it down tpo the file…the other way is not possible/implemented?

    In general, I want to ask…how do you do, if you are writting an template…do it directly in the template editor? My approach is to do it Eclipse & copy it into the template editor…because ion Eclipse I have code highlithing, formating shortcuts and auto completion…

    best, thomas

  • #4 / Dec 13, 2010 4:02pm

    Ingmar

    29245 posts

    I see that every template is also saved as a .html file in system/expressionengine/templates/...

    If you turn on that option, yes.

    The problem is: If I code directly in this file, and afterwards open the template editor, it’s not the same version. This is only one way—> if you save a template over template editor, it will write it down tpo the file…the other way is not possible/implemented?

    Saving files as templates is usually done in order to be able to use an external editor. That said, “Synchronize Templates” should do what you want.

  • #5 / Dec 14, 2010 5:39am

    Thomas Hartmann

    170 posts

    Saving files as templates is usually done in order to be able to use an external editor. That said, “Synchronize Templates” should do what you want.

    That’s exactly what I want to do! THX!

  • #6 / Dec 14, 2010 3:26pm

    Ingmar

    29245 posts

    Very glad to hear it. Please post again as needed.

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

ExpressionEngine News!

#eecms, #events, #releases