tags:

views:

68

answers:

2

By default view files need to end in "Success". So my index view file would be named "indexSuccess.php". Is there a way to globally change this suffix? I'd like to set it to blank so that my view file could simply be named "index.php"

+2  A: 

You can't change it directly - that value is defined as a class constant at sfView::SUCCESS.

And even if you could, I suspect you'd break a bunch of things.

I'd advise against this - the actionName/ViewName paradigm is pretty deeply embedded

  • All of symfony's defaults use it
  • module.yml uses it
  • probably other places i can't think of

And even if you could, I suspect the amount of work required would not be an economical trade-off with the time saved by not having to type "Success" into your template file names.

Peter Bailey
Thanks, I didn't know it was that deeply embedded, definitely doesn't seem worth the hassle in that case.
Arms
A: 

Not a direct fix to the question, but note that your actions can return '' to make your templates look like plain ol' action.php.